Support » Fixing WordPress » What is the function to list allowed XHTML tags for comments

Viewing 6 replies - 1 through 6 (of 6 total)
  • in your comments.php look for something like this
    <p><strong>Some HTML allowed:</strong><br/><?php echo allowed_tags(); ?></p>

    it might be there and edited out, if so remove the editing comments.

    if it isnt there, put in the php call with whatever else you want, ive got the p and strong tags.

    Fantastic! That did the trick – thank you. Now, does anyone know how I remove <b> and <i> from the allowed list as they have been deprecated in XHTML 1.1?

    whooami

    (@whooami)

    Member

    edit wp-includes/kses.php

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Don’t bother removing them. B and I get transformed into strong and em automatically anyway. I think. Try it and see. 🙂

    @whooami… thanks for that guidance – sorry if that is too obvious but I didn’t know if there was a preferred method or anything. Commenting out the <b>, <i> and <strike> tags in $allowed tags worked as I’d hoped.

    @otto42 – thanks also for taking the time to reply; however I have removed the non-compliant tags just in case 😉

    I just set up a blog for students in my intro to web design class (more of a design class than a programming class). I want them to be able to use the style tag in their posts… Yes, it’s going to make for some hideous comments, but that’s part of the learning process.

    Can you be more specific about how to allow the style tag to the kses.php file?

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘What is the function to list allowed XHTML tags for comments’ is closed to new replies.