trackback_rdf() for IDN (xn--) Domains produces invalid HTML
|Reported by:||lathspell||Owned by:|
The trackback_rdf() function from wp-includes/comment-template.php wraps the "<rdf:RDF>...</rdf:RDF>" output inside "<!-- ... -->" HTML comments, probably to be safe as not all Browsers understand them.
When using Wordpress 2.9.1 on a site with an international domain name  that contains special characters like German "Umlauts" like äöü, this domain name is written as e.g. xn--tst-qla.de for täst.de.
Now the output of trackback_rdf() suddenly gets a "--" which is the SGML/HTML comment separator mark . Firefox 3.5.6 e.g. sees this as the end of the comment and therefore shows the final "-->" as text to the user.
As the whole RDF tag is supposed to be invisible for the user, it's a bug in Wordpress :-(
Here is an real world example output:
<p class="post-tags"> </p> <p class="post-info"> </p> <!-- <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"> <rdf:Description rdf:about="http://xn--bcher-entdecken-zvb.de/wordpress/index.php/wortlieblinge/" dc:identifier="http://xn--bcher-entdecken-zvb.de/wordpress/index.php/wortlieblinge/" dc:title="Wortlieblinge" trackback:ping="http://xn--bcher-entdecken-zvb.de/wordpress/index.php/wortlieblinge/trackback/" /> </rdf:RDF> --> </div>
Sadly I have not yet come up with a solution. PHPs urlencode() does not escape a double dash - which is ok as its usually perfectly valid. Maybe someone with RDF experience has a good idea.
Change History (13)
5 years ago
- Cc codestyling added
- Keywords needs-patch dev-feedback added; has-patch removed
- Version set to 3.1