X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=includes%2FLinker.php;h=a3fba831d457b5e405f65f2835df2e0bb998aa24;hb=db4fa6fb9ffc4601e7a02b6c30f22962db63615c;hp=0aa8ec5649a45148b53da574849b7099438431c4;hpb=797947825f068d1557f55ff5f2f9ddce07f0b564;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Linker.php b/includes/Linker.php index 0aa8ec5649..a3fba831d4 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1076,10 +1076,6 @@ class Linker { * @author Erik Moeller * @since 1.16.3. $wikiId added in 1.26 * - * Note: there's not always a title to pass to this function. - * Since you can't set a default parameter for a reference, I've turned it - * temporarily to a value pass. Should be adjusted further. --brion - * * @param string $comment * @param Title|null $title Title object (to generate link to the section in autocomment) * or null @@ -1087,7 +1083,7 @@ class Linker { * @param string|null $wikiId Id (as used by WikiMap) of the wiki to generate links to. * For use with external changes. * - * @return mixed|string + * @return string HTML */ public static function formatComment( $comment, $title = null, $local = false, $wikiId = null @@ -1213,7 +1209,7 @@ class Linker { * as used by WikiMap. * * @return string HTML - * @return-taint escapes_html + * @return-taint onlysafefor_html */ public static function formatLinksInComment( $comment, $title = null, $local = false, $wikiId = null @@ -1221,6 +1217,7 @@ class Linker { return preg_replace_callback( '/ \[\[ + \s*+ # ignore leading whitespace, the *+ quantifier disallows backtracking :? # ignore optional leading colon ([^\]|]+) # 1. link target; page names cannot include ] or | (?:\|