WordPress.org

Ready to get started?Download WordPress

Forums

Comment tag attributes being stripped (7 posts)

  1. lars
    Member
    Posted 10 years ago #

    *bump*

  2. lars
    Member
    Posted 10 years ago #

    the kses filter is applied at the very end of kses.php:
    <pre>
    add_filter('comment_text', 'wp_filter_kses');
    </pre>
    the problem here is that with this filter enabled, all element attributes are stripped out (including anchor hrefs).
    however, in the preceding line, the same filter gets applied to comment_author, and there it works.
    a temporary workaround to restore the attributes is to comment out the above line. i'm hoping for a real fix though.

  3. Nick Momrik
    Member
    Posted 10 years ago #

    Has anyone found a solution to this yet?

  4. Nick Momrik
    Member
    Posted 10 years ago #

    Lars,
    If you remove that line or comment it out, won't that allow people to put in scripts that could crash your page? I'd reather have html tags not working in comments for now instead of having the possibility that somone puts nasty javascript into a comment.

  5. Matt Mullenweg
    Troublemaker
    Posted 10 years ago #

    Fixed.

  6. Nick Momrik
    Member
    Posted 10 years ago #

    Woohooo!! You guys rock! Working great!

  7. lars
    Member
    Posted 10 years ago #

    Great news. I'm off to the nightly builds then.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.