WordPress.org

Ready to get started?Download WordPress

Forums

2 Click Social Media Buttons
CDATA closing tag is escaped to ]]& gt; (3 posts)

  1. NoMad1337
    Member
    Posted 1 year ago #

    Hello,
    I'm working on my blog to keep everything XHTML 1.0 transitional valid, and this plugin is the last thing to fix:
    In /libs/class-twoclick-frontend.php @ line 978, a CDATA block is added to $var_sJavaScript, which later shows up as a sting to be used within a filter for the_content.
    However, on the final webpage, the closing tag of the CDATA element is escaped to ]]& gt; (rather than ]]>, without the space. WordPress.org changes the html-entity the the html element...).
    Is there any way to fix this?

    http://wordpress.org/extend/plugins/2-click-socialmedia-buttons/

  2. NoMad1337
    Member
    Posted 1 year ago #

    OK, after trying several approaches, I'm going to modify the plugin.
    In /libs/class-twoclick-frontend.php, the jQuery code is generated for each individual entry. I know the entries need different IDs to work independent, but why always output the same jQuery function for each of these entries? The ID is the only variable (plus excerpt and URL, which both can be retrieved from DB when the ID is known), so why don't we make it a variable?
    The Description/Info text is globally set, this needs to be written once. Post-ID, URL, Excerpt (etc) can be used as a parameter in a function to relace all individual functions.
    This wouldn't only result in valid HTML, but it could also result in better performance.
    I'm not familiar with jQuery, so if anybody would like to help me out, please contact me.
    Thanks,
    NoMad

  3. Arno Welzel
    Member
    Posted 7 months ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic