Topic on Extension talk:LinkAttributes

link caption too much

1
Cory (talkcontribs)

This extension is generated link caption with strings that should not be included.

I make a patch of it. Please test and merge it.

--- LinkAttributes.body.php.head        2023-07-05 10:28:21.713753000 +0900
+++ LinkAttributes.body.php     2023-07-05 10:44:13.000000000 +0900
@@ -42,10 +42,10 @@
                /* Extract attributes, separated by | or |. /u is for unicode, to recognize the |.*/
                $arr = preg_split( '/[||]/u', $_text);
                $_text = array_shift( $arr );
-               if ($text instanceof HtmlArmor) {
-                       $_text = new HtmlArmor($_text);
+               if ($_text instanceof HtmlArmor) {
+                       $text = new HtmlArmor($_text);
                } else {
-                       $text = $text;
+                       $text = $_text;
                }

                foreach ( $arr as $a ) {

for details please see here→ https://phabricator.wikimedia.org/T341106

Reply to "link caption too much"