WordPress.org

Support

Support » How-To and Troubleshooting » Fix for Trackback RDF when title contains HTML

Fix for Trackback RDF when title contains HTML

  • It doesn’t break validation, but it does break HTML-only browsers that treat any > as the end of a tag. If you have HTML in the title, it gets inserted as-is into the dc:title attribute, causing it to output the rest of the RDF tag as text.
    I edited b2templatefunctions.php, line 1109, to read:
    echo ‘ dc:title=”‘.addslashes(strip_tags(get_the_title())).'”‘.”\n”;
    I assumed that, for the most part, any HTML in a title is likely to be text formatting (b, i, strong, em, etc.), so it should be safe to just rip out any tags. (This of course assumes you’re not using MathML or something in your titles, in which case I don’t know *what* would be the best way to handle things…)

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Fix for Trackback RDF when title contains HTML’ is closed to new replies.
Skip to toolbar