X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FLinker.php;h=da8daf4c8bf1b253ef2e660cb8e5525ed9c78384;hb=3842fd20799f80116b3a32b601ec67e97b71bae8;hp=08a57247a6d276179f1b72789c9aadba5e22dcd0;hpb=33afb7440a03df8d1878c94d2f3d3b9fdd1a848b;p=lhc%2Fweb%2Fwiklou.git
diff --git a/includes/Linker.php b/includes/Linker.php
index 08a57247a6..da8daf4c8b 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -431,7 +431,11 @@ class Linker {
$s = $thumb->toHtml( $params );
}
if ( $frameParams['align'] != '' ) {
- $s = "
{$s}
";
+ $s = Html::rawElement(
+ 'div',
+ [ 'class' => 'float' . $frameParams['align'] ],
+ $s
+ );
}
return str_replace( "\n", ' ', $prefix . $s . $postfix );
}
@@ -1072,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
@@ -1208,7 +1208,8 @@ class Linker {
* @param string|null $wikiId Id of the wiki to link to (if not the local wiki),
* as used by WikiMap.
*
- * @return string
+ * @return string HTML
+ * @return-taint onlysafefor_html
*/
public static function formatLinksInComment(
$comment, $title = null, $local = false, $wikiId = null
@@ -1216,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 |
(?:\|