WordPress.org

Ready to get started?Download WordPress

Forums

"write page" strips html tags (9 posts)

  1. brycebenton
    Member
    Posted 9 years ago #

    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?

  2. ColdForged
    Member
    Posted 9 years ago #

    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.

  3. brycebenton
    Member
    Posted 9 years ago #

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

  4. hiegl
    Member
    Posted 9 years ago #

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

  5. Kafkaesqui

    Posted 9 years ago #

    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() ) : ?>

  6. hiegl
    Member
    Posted 9 years ago #

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

  7. hiegl
    Member
    Posted 9 years ago #

    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?

  8. hiegl
    Member
    Posted 9 years ago #

    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?

  9. hiegl
    Member
    Posted 9 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.