WordPress.org

Ready to get started?Download WordPress

Forums

RTE - strip html from content? / valid html (5 posts)

  1. GrendelS
    Member
    Posted 8 years ago #

    How do I delete tags I don't want to keep? Let's say, a functionality like the "default formatting" from OO.org. The other day, I copypasted a short text which seemed to be smaller than the rest. Looking at the html, there were font tags (deprecated in xhtml, so it'd have broken validation) which weren't sorted out during the process. Can I configure the RTE somehow?

  2. moshu
    Member
    Posted 8 years ago #

    Yes, I also noticed that copying a text from a website directly into the RTE > it will bring over the original fonts, too... moreover with inline font tags. I guess, that's the nature of the beast :)
    Second time I tried to do it by clicking on the HTML button and copied the text into the little window. In this way it was OK.

  3. GrendelS
    Member
    Posted 8 years ago #

    If the RTE deleted invalid html on "save&continue editing" it would already help... I've read somewhere that it functions as a validator, but can't confirm this - at least, the tags that weren't supposed to be there after the saving persisted. There're two plugins, a tidy and an xhtml plugin which might help... haven't used the former, and the latter hasn't been updated for xhtml 1.1 yet.

  4. schestowitz
    Member
    Posted 8 years ago #

    If you want to 'cleanse' the code outside WordPress you can use an executable. Just copy from the box, and paste it back when you are done.

    http://freshmeat.net/projects/htmltidy/

  5. masquerade
    Member
    Posted 8 years ago #

    Or, even better, create another use for yourself, do not give him the administrator role. This will also disable the unfiltered_html cap, and thus your HTML will be run through kses and other systems that will remove invalid HTML.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.