* (bug 6813) Don't break HTML validator when using trackbacks
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 22 Mar 2008 00:20:39 +0000 (00:20 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 22 Mar 2008 00:20:39 +0000 (00:20 +0000)
RELEASE-NOTES
includes/Title.php

index 95af539..bd4e8e7 100644 (file)
@@ -122,6 +122,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * PHP 5.3 compatibility fix for wfRunHooks() called with no parameters
 * (bug 6447) Trackbacks now work with transactional tables, if enabled
 * (bug 6892, 7147) Trackback error handling, optional fields more robust
+* (bug 6813) Don't break HTML validator when using trackbacks
 
 
 === API changes in 1.13 ===
index 10987a2..c07d971 100644 (file)
@@ -2895,7 +2895,12 @@ class Title {
                $title = htmlspecialchars($this->getText());
                $tburl = $this->trackbackURL();
 
-               return "
+               // Autodiscovery RDF is placed in comments so HTML validator
+               // won't barf. This is a rather icky workaround, but seems
+               // frequently used by this kind of RDF thingy.
+               //
+               // Spec: http://www.sixapart.com/pronet/docs/trackback_spec
+               return "<!--
 <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/\">
@@ -2904,7 +2909,8 @@ class Title {
    dc:identifier=\"$url\"
    dc:title=\"$title\"
    trackback:ping=\"$tburl\" />
-</rdf:RDF>";
+</rdf:RDF>
+-->";
        }
 
        /**