dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c186ff5
)
Revert r49653 "Make the link regex non-greedy so that it is possible to add '|' to...
author
Brion Vibber
<brion@users.mediawiki.org>
Tue, 28 Apr 2009 23:33:28 +0000
(23:33 +0000)
committer
Brion Vibber
<brion@users.mediawiki.org>
Tue, 28 Apr 2009 23:33:28 +0000
(23:33 +0000)
links."
Pipes would definitely not work in titles. The particular regex change here would for instance break image options if | were added to $wgLegalTitleChars.
includes/parser/Parser.php
patch
|
blob
|
history
diff --git
a/includes/parser/Parser.php
b/includes/parser/Parser.php
index
d0942d4
..
0f57d57
100644
(file)
--- a/
includes/parser/Parser.php
+++ b/
includes/parser/Parser.php
@@
-1460,7
+1460,7
@@
class Parser
if ( !$tc ) {
$tc = Title::legalChars() . '#%';
# Match a link having the form [[namespace:link|alternate]]trail
- $e1 = "/^([{$tc}]+
?
)(?:\\|(.+?))?]](.*)\$/sD";
+ $e1 = "/^([{$tc}]+)(?:\\|(.+?))?]](.*)\$/sD";
# Match cases where there is no "]]", which might still be images
$e1_img = "/^([{$tc}]+)\\|(.*)\$/sD";
}