Skip to content

Commit 955f19a

Browse files
authored
Edit: fix link regex, titles cannot have [] (x-tools#581)
Bug: T408332
1 parent 7fb5a55 commit 955f19a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Model/Edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ public static function wikifyString(
381381

382382
$linkMatch = null;
383383

384-
while (preg_match_all("/\[\[:?(.*?)]]/", $summary, $linkMatch)) {
384+
while (preg_match_all("/\[\[:?([^\[\]]*?)]]/", $summary, $linkMatch)) {
385385
$wikiLinkParts = explode('|', $linkMatch[1][0]);
386386
$wikiLinkPath = htmlspecialchars($wikiLinkParts[0]);
387387
$wikiLinkText = htmlspecialchars(

0 commit comments

Comments
 (0)