• When I use HTML tags inside of a ‘page’ (not ‘post’) entry, and then view the output, the HTML tags have been stripped out.

    The tags are still kept in the database, and they look fine in the preview, but when I view the page, the
    <li>'s and <a>'s have been stripped out. The HTML I’m using is valid markup.

    Using the Markdown plugin works as it should. However, the people who will be using this blog need to have the ability to create pages with tables of data in a WYSIWYG editor and then paste the HTML into the “write page” entry field. It’s not practical for me to insist that they learn Markdown or Textile syntax.

    What I really need is for WordPress to stop being so aggressive in restructuring perfectly good markup. How do I do this?

    I’m using WordPress 1.5-beta-1 2005-01-22. I’ve tried disabling all Plug-ins.

    Any ideas?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Sounds almost like your page template is displaying the excerpt — which is aggressive in removing markup — instead of the actual entry content. Double-check your page template to make certain you’re displaying the the_content() and not the_excerpt().

    In other words, there’s nothing special about page processing that would account for this. I just created a fresh test page on my sandbox base install of Strayhorn and my unordered list was displayed just dandy. Time to look elsewhere.

    Thread Starter brycebenton

    (@brycebenton)

    Okay, it *does* have something to do with the excerpt vs. full entry thang. Thanks for the tip.

    Having the same problem here. Could you please give me some direction where to look in my template.

    In the directory of the theme you use (wp-content/themes/*), look at page.php. In that file you’re looking for:

    <?php the_excerpt(); ?>

    Change it to:

    <?php the_content(); ?>

    Note: If there is no page.php, look around index.php for a section that starts something like:

    <?php if( is_page() ) : ?>

    Oops, unfortunately there is no such file (page.php) in my template folder. Btw. it is this template: https://www.fuegodesigns.com/blog/white/

    O.k., found it in the index.php of the template. But there is already this:

    <div class=”storycontent”>
    <?php the_content(); ?>
    </div>

    Nothing like “the_excerpt” in the whole code!
    Any other idea?

    I found that despite the code being there in the source view of the site it is not rendered by the browser as it should be.
    A simple unordered list is not shown. So the tags are not stripped but the browser refuses to interpret them.
    Could this be connected to the DTD?

    Found it! It?′s a definition in the style sheet. Must have been blind. Thanks anyway!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘“write page” strips html tags’ is closed to new replies.