WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] microformats in html editor : div and span elements getting stripped on save (4 posts)

  1. here
    Member
    Posted 3 years ago #

    Hey all --

    I'm trying to mark-up a post with div and span elements in order to make it readable as a microformat . When I edit the post in the html editor and then save it, all the classes / properties / content items are dropped from the tags.

    <span property="foo">bar</span>

    becomes simply

    <span>bar</span>

    How do I keep wordpress from sanitizing in this way ?

    http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=146645
    http://googlewebmastercentral.blogspot.com/2009/10/help-us-make-web-better-update-on-rich.html

    http://wordpress.org/support/topic/marking-up-content-with-rdfa

    I know this has come around before, but I haven't found anything with some quick searches. Thanks for your help !

  2. here
    Member
    Posted 3 years ago #

    bump. unresolved.

  3. here
    Member
    Posted 3 years ago #

    using shortcode API to workaround and create the appropriate spans :

    http://codex.wordpress.org/Shortcode_API

    [caption]My Caption[/caption]

    into

    <span class="caption">My Caption</span>

  4. richweb99
    Member
    Posted 3 years ago #

    Know more about HTML span an learn basics of HTML tags at HTML TUtorial

Topic Closed

This topic has been closed to new replies.

About this Topic