• This plugin is working nice, but i realized wordpress wraps the entire HTML content between the <!–start_raw–> – <!–end_raw–> latters inside a <p> tag, which results in non valid HTML most times. This also happens when the visual editor is disabled in user profile.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m having this problem too.

    I’ve found that editing the raw_html.php file and changing the line
    add_filter('the_content', 'wsh_insert_exclusions', 1001);
    to
    add_filter('the_content', 'wsh_insert_exclusions', 1);
    gets rid of the opening <p> tag, but the closing </p> tag seems to remain. Hmm.

    As far as I can tell, the <p> tag problem problem is due to the raw html plugin losing a fight with wpautop for control of the blocks of raw (x)html. The plugin gets control over the <!--start_raw--> and <!--end_raw--> tags and everything inside them, but wpautop just bindly wraps a paragraph around each block.

    Ideally, someone will rewrite the plugin to handle wpautop a little more smartly, perhaps reusing some of the code in wp-unformatted.

    I nuked the wpautop function to test where the frig the outer wrapping <p> is coming from, it’s not wpautop, I also looked @ my raw database post and the <p> isn’t there either (so it’s not TinyMCE).

    So I think the <p> is coming from an addFilter(‘the_content’, xxxx);

    Whatever the cause; it’s making wordpress the worst xhtml strict cms ever, I’m going to find it, and going to rage blog about it. Just wait.

    EDIT: Oh, wordpress broke the xhtml by wrapping the omnious <p> around a <div> created by the “Visual Editor” from an image, big fail.

    I found the source of the problem.

    Drumroll.

    MARKDOWN is cause. I disabled Markdown the the omnious <p> tags disappear.

    Michel Fortin what the frig is going on.

    http://michelf.com/projects/php-markdown/ I think I’m going to go try out textile now.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Remove wrapping <p> tags around Raw HTML’ is closed to new replies.