Enhance stacktrace logging for fatals
[lhc/web/wiklou.git] / includes / Linker.php
index bb65cdf..4d3f3ce 100644 (file)
@@ -939,7 +939,10 @@ class Linker {
 
                        $href = self::getUploadUrl( $title, $query );
 
-                       return '<a href="' . htmlspecialchars( $href ) . '" class="new" title="' .
+                       // @todo FIXME: If we don't to escape apostrophes (single quotes) here (using ENT_QUOTES),
+                       // then double apostrophes will be parsed as italics somewhere later in the parser,
+                       // and break everything horribly
+                       return '<a href="' . htmlspecialchars( $href, ENT_QUOTES ) . '" class="new" title="' .
                                htmlspecialchars( $title->getPrefixedText(), ENT_QUOTES ) . '">' .
                                $encLabel . '</a>';
                }
@@ -1704,8 +1707,7 @@ class Linker {
        }
 
        /**
-        * Generate a table of contents from a section tree
-        * Currently unused.
+        * Generate a table of contents from a section tree.
         *
         * @param array $tree Return value of ParserOutput::getSections()
         * @param string|Language|bool $lang Language for the toc title, defaults to user language