problems with > and < in comments post? (2 posts)

  1. dex2k
    Posted 10 years ago #

    i have a problem, whenever a user uses > or < in a blog post the rest of the comment disapears, is there a bug in the submission code?

  2. llizard
    Posted 10 years ago #

    Are you sure that this includes >? There should not be a problem with the greaterthan symbol if it is the first thing placed. But there will be a problem with the lessthan symbol because it is integral to HTML coding itself.

    Because the comments can be set up to accept some HTML tags, your user probably has to close any instances of <

    What you could try is to make sure that "code" is allowed in the list of allowed tags in kses.php

    Look for:
    if (!CUSTOM_TAGS) {
    $allowedtags = array(

    Then scroll down to

    'br' => array(),

    If the following is NOT there, you can add it on the next line:
    'code' => array(),

    You can then make some sort of note to tell your commenters that if they wish to use the symbol <, they must surround it with the HTML tags of <code></code>

    (I HOPE this post made sense and that it came out correctly! It's extremely difficult to post coding examples in this forum.)

    edit: Apparently you can also override kses.php by creating a 'my-hacks.php' I'm afraid that I threw caution to the winds and edited my kses.php directly....

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.