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…)
- The topic ‘Fix for Trackback RDF when title contains HTML’ is closed to new replies.