[wp-trac] [WordPress Trac] #11734: trackback_rdf() for IDN (xn--) Domains produces invalid HTML
WordPress Trac
wp-trac at lists.automattic.com
Wed Jan 6 01:10:55 UTC 2010
#11734: trackback_rdf() for IDN (xn--) Domains produces invalid HTML
--------------------------+-------------------------------------------------
Reporter: lathspell | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: General | Version:
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
Hello
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 [1]
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 [2]. 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.
bye,
-christian-
[1]
http://en.wikipedia.org/wiki/Internationalized_domain_name#Example_of_IDNA_encoding
[2] http://htmlhelp.com/reference/wilbur/misc/comment.html
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11734>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list