Support » How-To and Troubleshooting » Comments cut off by Less-Than sign

Comments cut off by Less-Than sign

  • When I myself want to insert a < sign, I know to type in &lt;. However, the average commenter does not know to do this and is completely baffled when the majority of his/her comment gets cut off after a less-than symbol.

    Is there a plugin or a hack that I could implement to ensure that (at the very least) the rest of the comment after the less-than sign is not truncated. Commenters sometimes use it in ASCII faces and then have to retype their comment, which is a pain.

    I tried the Preserve Code plugin, but it only seems to work if you are a logged in user. Random people still continue to have the same problem. Is there something in the kses.php file that I would need to change to allow everyone to use the less-than sign without losing most of their comment?

Viewing 1 replies (of 1 total)
  • Moderator Samuel Wood (Otto)


    WordPress.org Tech Dude

    I have not actually tried this, but try adding this to your theme’s functions.php:

    add_filter('pre_comment_content', 'wp_specialchars', 10);

    Make a new functions.php file if you don’t already have one. And make *sure* that the functions.php file contains no blank space at the beginning or end of the file. It must start with <?php and end with ?>.

Viewing 1 replies (of 1 total)
  • The topic ‘Comments cut off by Less-Than sign’ is closed to new replies.