WordPress.org

Ready to get started?Download WordPress

Forums

Comment html is being stripped (8 posts)

  1. Derek Herman
    Member
    Posted 5 years ago #

    My web site has been upgraded to 2.8 recently from 2.7.1 and 2.6 before that. Anyhow, the comments have never worked correctly, or at least don't work the way I want them to.

    You can't seem to use any html in the comments because it gets stripped out. So, for example, if I used an anchor tag the link is stripped out and all that shows is the link text.

    Has anyone experienced this and if so what did you do to fix it. If you have not experienced this but know of a possible solution please let me know, this is getting ridiculous and users should be able to posts links in comments, hell I should be able to post links in comments.

    Don't know if this might help but even if I reply in the admin area the html is stripped out after I save.

    Plugins Used:

    • Akismet
    • FeedBurner FeedSmith
    • Flutter
    • Google XML Sitemaps
    • Redirection
    • Restrict Login By IP
    • Simply Exclude
    • WordPress Database Backup
    • WP-PageNavi
    • WP-Syntax
    • WP CSS
    • WP Super Cache
    • WP System Health
  2. ryans149
    Member
    Posted 5 years ago #

    First of all, try disabling all plugins one by one and check if this is solving the issue.

    I think one the below plugins should be the cause:

    WP-PageNavi
    WP-Syntax
    WP CSS
    Redirection

  3. asechrest
    Member
    Posted 5 years ago #

    Out-of-the-box WordPress functionality allows some HTML in comments.

    So I would guess this is a theme or plugin problem. As Ryans149 mentions, you should disable all plugins and switch to the default theme to see if the problem persists. If it doesn't, you've narrowed down the possible problems, and can move on from there.

  4. Derek Herman
    Member
    Posted 5 years ago #

    I found the plugin causing the issue, it's Flutter. Not sure how to fix this now. I wasn't aware that Flutter was filtering my comments.

  5. doc4
    Member
    Posted 4 years ago #

    valendesigns,

    Utilizing Flutter 1.0 with WordPress 2.8.4 and Flutter doesn't seem to be affecting the comment markup.

  6. Tammy Hart
    Member
    Posted 4 years ago #

    I am using flutter, and I get the same problem. very strange. I wonder if using a wysiwyg-type comment plugin might supersede this?

  7. mongushu
    Member
    Posted 4 years ago #

    Line # 158 of Main.php in the fresh-page folder of the Flutter plugin:
    add_filter('pre_comment_content','flutter_kses');

    Comment that line out:

    //add_filter('pre_comment_content','flutter_kses');

    Then your comments html will not be stripped out.

  8. Michael
    Member
    Posted 4 years ago #

    If you are having trouble with wordpress screwing up your HTML comments, maybe some "intelligent" formatting is to blame.

    Lines 56 and 57 of /wp-includes/formatting.php

    before:
    $static_characters = array_merge(array('---', ' -- ', '--', ' - ', 'xn–', '...', '', '\'s', '\'\'', ' (tm)'), $cockney);
    $static_replacements = array_merge(array('—', ' — ', '–', ' – ', 'xn--', '…', $opening_quote, '’s', $closing_quote, ' ™'), $cockneyreplace); `

    after:
    $static_characters = array_merge(array(/*'---', ' -- ', '--',*/ ' - ', 'xn–', '...', '', '\'s', '\'\'', ' (tm)'), $cockney);
    $static_replacements = array_merge(array(/*'—', ' — ', '–', */' – ', 'xn--', '…', $opening_quote, '’s', $closing_quote, ' ™'), $cockneyreplace);`

    Of course, you won't get fancy – (& # 8211 ;) characters when you put in double hyphens. But honestly, I don't care.

    Bah, and now it's being too fancy here too. Just look those lines up.

    (Also, why is there not a preview function?)

Topic Closed

This topic has been closed to new replies.

About this Topic