WordPress.org

Ready to get started?Download WordPress

Forums

Using HTML or XML tags in a post (4 posts)

  1. wls
    Member
    Posted 8 years ago #

    Hi, ...I'm trying to write a post that has some XML and HTML code in it, and the angle brackets of my content are getting treated as real HTML; in other words, I don't think they're being escaped properly. Even the built in HTML editor gets confused.

    I've tried using ampersands to escape them with HTML entities, but even those get swallowed up. I've even tried double-escaping, using ampersands to make an ampersand tag, to prefix the lt or gt entities. No dice.

    After searching with Google, I've found two support questions asking the same thing, both unresolved, both a year old. I'm hoping it's been resolved since then, and some kind soul can point me in the right direction.

    Obviously web editors, e.g. GMail, can escape without it being a problem; is there an option to enable this behavior?

    Thanks!

  2. Samuel B
    moderator
    Posted 8 years ago #

    Go to:
    admin -> Options -> Writing
    uncheck the box for "WordPress should correct invalidly nested XHTML automatically"

    Also turn off the wysiwyg editor.
    admin -> Uers -> scroll to bottom left

  3. wls
    Member
    Posted 8 years ago #

    This SOOO solved the issue. Thank you! Thank you! Thank you!

  4. sojic
    Member
    Posted 8 years ago #

    I'm trying to edit HTML code and insert something like this:

    '<script type="text/javascript"> alternate("Oktagon"); </script>'

    On the site it do not work. The quotes are changed with ’

Topic Closed

This topic has been closed to new replies.

About this Topic