• Resolved Wasca

    (@wasca)


    Hi Guys

    I have found that html characters are getting replaced by unicode values and breaking mt LMS course content. It happens when I replace file that is referenced in my course.

    My courses saves the content in a postmeta value field structured in a JSON format. Any Character that is an inverted comma gets converted to u2019. Any double quotes get converted to u201d

    This is saved and then my course code cannot parse the JSON data and fails to load.

    This does not happen in version 3.4.1 (which I have rolled back to)

    I have tried fully removing the plugin and reinstalling it with 3.4.2 but the error keeps happening.

    This is a link to a screen capture of a diff I did of small part of the course content before and after replacing file.

    Before is on the Left, after on the Right

    View post on imgur.com

    • This topic was modified 3 years, 6 months ago by Wasca.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Gerard Blanco

    (@sixaxis)

    Hi Wasca!

    Thanks for letting us know. I’d like to reproduce this on our servers. Could you tell me please step by step what I need to install, write, remove, etc.?

    Thank you!

    Thread Starter Wasca

    (@wasca)

    We are using the CleverCourse LMS system.

    https://themeforest.net/item/clever-course-learning-management-system-theme/8645312

    They save the course contents into a postmeta field.

    This is a sample you could use to test with.

    [{"lecture-section":"[{|gq2|lecture-name|gq2|:|gq2|test2|gq2|,|gq2|icon-class|gq2|:|gq2||gq2|,|gq2|pdf-download-link|gq2|:|gq2||gq2|,|gq2|allow-free-preview|gq2|:|gq2|disable|gq2|,|gq2|lecture-content|gq2|:|gq2|<p>|gq6|Nunc rhoncus|gq6| justo id sem tincidunt, eu congue augue venenati's. Nunc scelerisque justo et mauris ultricies, sit amet tristique erat ultrices. Interdum et malesuada fames ac ante ipsum primis in faucibus. Etiam quis libero a purus lacinia porta. Donec aliquam orci eget ante iaculis, in ullamcorper mauris lacinia. Aliquam libero ante, ultricies quis diam nec, dictum laoreet nisl. Integer ac turpis eu sapien cursus tristique. Morbi quis leo a mi vehicula faucibus non euismod dolor.</p>|g2n|<p>&nbsp;</p>|g2n|<p>[gdlr_button href=|gq6|https://static6.depositphotos.com/1000401/580/i/450/depositphotos_5809819-stock-photo-starry-deep-outer-space-nebula.jpg|gq6| target=|gq6|_blank|gq6| size=|gq6|medium|gq6| background=|gq6|#094074|gq6| color=|gq6|#ffffff|gq6| with_border=|gq6|yes|gq6| border_color=|gq6|#678eb3|gq6|][gdlr_icon type=|gq6|fa-file-pdf-o|gq6| size=|gq6|20px|gq6| color=|gq6|#FFF|gq6|] Download Image[/gdlr_button]</p>|g2n||gq2|}]","section-name":"Test1","section-quiz":"none","pass-mark":"","wait-time":"","wait-date":""}]

    In that sample is an image, change that image to something that is uploaded to your media library. You’ll probably need to associate that image in the media library with the post you create.

    Once you have that content above in your database (not sure how you’ll do it without CleverCourse, perhaps create a post with custom meta field called “gdlr-lms-content-settings” and put it in there.) then go to your media library and do a simple replace of the the image. As that image is associated with a particular post, the meta data get changed and all the ” and ‘ get swapped for unicode.

    I hope that helps.

    • This reply was modified 3 years, 6 months ago by Wasca.
    • This reply was modified 3 years, 6 months ago by Wasca.
    Plugin Support Gerard Blanco

    (@sixaxis)

    Wasca,

    Next release should contain a fix for this 😉

    Thread Starter Wasca

    (@wasca)

    @sixaxis Thank you, look forward to getting it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Another – Replace bug html unicode chars’ is closed to new replies.