Support » Plugin: Polldaddy Polls & Ratings » [Plugin: Polldaddy Polls & Ratings] WordPress is altering HTML output of Polldaddy plugin.

  • Resolved jrhall


    I’m having some trouble with WP “correcting” code for the Polldaddy plugin. Here’s the original code from polldaddy/ratings.php:

    Here’s what WP is kicking out:

    I’m noticing two “errors”:

    1. <p> tag being added at the beginning of line 2.
    2. The second > is being converted to >.

    I’m using this plugin, which should be disabling wpautop, etc. It’s odd, too, that it’s only converting one >. As far as I know, the plugin is working, as my post and page content is not affected.

    I basically never use the WYSIWYG editor, and I have tried deleting and creating new posts, etc., but still no luck. Any help would be appreciated. All of my pages validate XHTML 1.0 STRICT, but anything with a post on it (because of ratings) fails to validate. If I turn off ratings for posts, the post page validates. (FYI: I don’t use ratings on pages)

    I will try to check back frequently if anyone has an idea but needs more information. Thanks!

Viewing 1 replies (of 1 total)
  • First, I just noticed that the content in my earlier post isn’t quite correct. The issue is that WordPress is changing any instance of ]]> to ]]& g t ; (I’ve inserted the spaces because I don’t know how else to force the HTML reference to display without converting to the >. While that works great for displaying text on a page, it’s definitely not the same thing when the browser goes to interpret HTML code.

    I found a solution, though it’s less than desirable.

    Unfortunately, the only way I can find to stop WordPress from mangling the Polldaddy ratings code is to alter a WordPress core file. I’ve tried unloading every filter, and the issue still persists. The “solution” is this:

    Modify file: /wp-includes/post-template.php

    Line 168: $content = str_replace(']]>', ']]&gt', $content);

    Line 168: //$content = str_replace(']]>', ']]&gt', $content);

    Again, this isn’t really an ideal solution since you have to modify the WordPress core, but it’s the only half-way solution I’ve found so far.

    I’ll mark this thread resolved, but it’d be nice if there were a better solution…

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Polldaddy Polls & Ratings] WordPress is altering HTML output of Polldaddy plugin.’ is closed to new replies.