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:
5034a31
)
Fixed infinite loop in formatComment due to backreferences in preg_replace replacemen...
author
Tim Starling
<tstarling@users.mediawiki.org>
Wed, 12 Oct 2005 16:53:30 +0000
(16:53 +0000)
committer
Tim Starling
<tstarling@users.mediawiki.org>
Wed, 12 Oct 2005 16:53:30 +0000
(16:53 +0000)
includes/Linker.php
patch
|
blob
|
history
diff --git
a/includes/Linker.php
b/includes/Linker.php
index
84e1bda
..
8da9612
100644
(file)
--- a/
includes/Linker.php
+++ b/
includes/Linker.php
@@
-726,6
+726,8
@@
class Linker {
$match[1] = substr($match[1], 1);
$thelink = $this->makeLink( $match[1], $text, "", $trail );
}
+ # Quote backreferences, then run preg_replace
+ $thelink = strtr( $thelink, array( "\\" => "\\\\", '$' => "\\$" ) );
$comment = preg_replace( $linkRegexp, $thelink, $comment, 1 );
}
wfProfileOut( $fname );