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:
8bcdc56
)
Quote namespace names before plonking them into a regular expression, to give me...
author
Rob Church
<robchurch@users.mediawiki.org>
Sun, 3 Dec 2006 04:09:48 +0000
(
04:09
+0000)
committer
Rob Church
<robchurch@users.mediawiki.org>
Sun, 3 Dec 2006 04:09:48 +0000
(
04:09
+0000)
includes/Linker.php
patch
|
blob
|
history
diff --git
a/includes/Linker.php
b/includes/Linker.php
index
b54c426
..
f7b5c0a
100644
(file)
--- a/
includes/Linker.php
+++ b/
includes/Linker.php
@@
-931,8
+931,8
@@
class Linker {
# format regular and media links - all other wiki formatting
# is ignored
# format regular and media links - all other wiki formatting
# is ignored
- $medians = '(?:' .
Namespace::getCanonicalName( NS_MEDIA
) . '|';
- $medians .=
$wgContLang->getNsText( NS_MEDIA
) . '):';
+ $medians = '(?:' .
preg_quote( Namespace::getCanonicalName( NS_MEDIA ), '/'
) . '|';
+ $medians .=
preg_quote( $wgContLang->getNsText( NS_MEDIA ), '/'
) . '):';
while(preg_match('/\[\[(.*?)(\|(.*?))*\]\](.*)$/',$comment,$match)) {
# Handle link renaming [[foo|text]] will show link as "text"
if( "" != $match[3] ) {
while(preg_match('/\[\[(.*?)(\|(.*?))*\]\](.*)$/',$comment,$match)) {
# Handle link renaming [[foo|text]] will show link as "text"
if( "" != $match[3] ) {