• Resolved lunarboy

    (@lunarboy)


    How do I prevent WP from rewriting my HTML when I use the HTML source editor in a post?

    I’ve run into 2 instances this weekend when I’ve tried to format a post or embed a QuickTime movie into a post only to find that WP is deleting tags or adding tags.

    I’ve even tried turning off the visual editor, but WP still does the rewriting.

    Thanks.

Viewing 10 replies - 1 through 10 (of 10 total)
  • There are several plugins to stop this from happening.
    https://www.thunderguy.com/semicolon/wordpress/code-markup-wordpress-plugin/
    One example – you can search for more.
    https://codex.www.ads-software.com/Plugins#Plugin_Lists_and_Repositories
    or just Google for it.

    Thread Starter lunarboy

    (@lunarboy)

    Hi Samboll:

    Thanks for your suggestions. However, after looking at that plugin and others, it’s not really stopping what I’m talking about. I don’t want to display HTML markup, I want to use it within my post and not have WordPress rewrite it.

    For example, I wanted to embed a QuickTime movie into my post using HTML. But as soon as I add the traditional [object] and [embed] tags, WP adds extra [p] tags and screws it all up.

    Another instance is when I needed to put 2 paragraphs [p] within one [div]. WP stripped the first [p], closed the [div] and then started a new [p]. Clearly not what I’d intended.

    Thanks.

    same problem

    Have you tried Text Control? It has a nice “no formatting” option.

    Also, make sure that under Options > Writing, the “correct invaidly nested XHTML” box is unchecked.

    WordPress is terrible with this. I’ve been trying to put a form on one of my pages and wordpress destroys the formatting with useless [p] tags.

    In some cases, I’ve avoided trouble by pasting my code without any tabs or line breaks.

    I wish there was a way to turn off html parsing for individual posts or pages. Or a command to wrap around text that you don’t want wordpress to touch.

    Text Control looks all right. But this is a core issue that shouldn’t be fixed with duct tape.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    It’s not an “issue”, it’s a design decision. It’s made for people who *don’t* know HTML. If you really needed to put a form in a page, then the idea is that you’d know enough to make a new page template with the form in it and use that for your page instead.

    And if you really want to disable the automatic paragraph formatting (although I don’t see the point of doing so, myself… proper semantic text would have paragraph markers in it), then here’s a plugin to do that for you.

    https://ottodestruct.com/wpstuff/disableautop.zip

    You’ll also probably want to turn off the “WordPress should correct invalidly nested XHTML automatically” option on the Options->Writing page.

    Thread Starter lunarboy

    (@lunarboy)

    Truth is my wife and I share a blog. I know enough HTML to format things myself or to add Flash or QuickTime movies. But my wife does not. So I don’t want to disable the auto formatting altogether. I’d like to be able to do it on a per post basis for those ocassions where I want to embed a YouTube video for instance.

    TextControl works like a charm, thanks for the suggestion. However, you must also turn off the visual rich editor in your user profile in order for it to work.

    Try Viper’s Video Quicktags. Makes inserting videos quite painless, and doesn’t involve broken code:

    https://www.viper007bond.com/wordpress-plugins/vipers-video-quicktags/

    NOTE: Site is currently down, should be back once Viper has finished moving to a new host (or so it says).

    New host is having issues. WordPress (and most other scripts) just show blank pages. Still working on it. My friend will be going to the data center to reinstall Fedora on it tomorrow. Hopefully that’ll fix it.

    For now, here’s a temporary direct link that’ll work.

    My site is back up. ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Preventing WP from rewriting HTML in post’ is closed to new replies.