Forums

HTML in comments issue (6 posts)

  1. gudlyf
    Member
    Posted 7 years ago #

    I just upgraded to the latest CVS of WP 1.5, and now it seems that some HTML gets taken litterally, making things a mess. Even code within or <pre> tags is getting translated into the litteral HTML. For example, someone wanted to illustrate some codw regarding iframes, so in a comment they had:

    <iframe src="..."></iframe>

    And the damn iframe is in the comments! What can I do to fix this? Thanks.

  2. Kafkaesqui
    Moderator
    Posted 7 years ago #

    You'd need to edit the $allowedtags array in include/kses.php to allow iframe (or other) tags in comments. See this post in Weblog Tools Collection for a modded kses.php file listing proper attribute nesting on most tags, including iframe:

    http://weblogtoolscollection.com/archives/2004/04/23/kses-based-html-checking/

  3. Matt Mullenweg
    Troublemaker
    Posted 7 years ago #

    You're running an old nightly, upgrade to the latest. There was a bug with filters in some of the downloads.

  4. Kafkaesqui
    Moderator
    Posted 7 years ago #

    Or it could just be a bug............

  5. gudlyf
    Member
    Posted 7 years ago #

    I'm at the latest CVS checkout right now. I wound up having to put this in my my-hacks.php in order to temporarily "fix" it:

    add_filter('comment_text', 'wp_specialchars');

    Although that affects all tags, even legit ones. :(

  6. gudlyf
    Member
    Posted 7 years ago #

    Can anyone else test this and verify it's a bug or not? Thanks...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.