Bug: parenthesis are allowed in namespaces

Bug: 73366
Change-Id: I7304046cfa7eda6356b2c61e716d76330cf1ee56
This commit is contained in:
Erik Bernhardson 2014-11-13 11:52:04 -08:00
parent 262a3a1587
commit 4549a312cc

View file

@ -667,12 +667,12 @@ abstract class EchoDiscussionParser {
* - First element is the position of the signature.
* - Second element is the normalised user name.
*/
static function getUserFromLine( $line, $timestampPos ) {
static public function getUserFromLine( $line, $timestampPos ) {
global $wgContLang;
// lifted from Parser::pstPass2
$tc = '[' . Title::legalChars() . ']';
$nc = '[ _0-9A-Za-z\x80-\xff-]'; // Namespaces can use non-ascii
$nc = '[() _0-9A-Za-z\x80-\xff-]'; // Namespaces can use non-ascii
// [[ns:page]] with optional fragment(#foo) and/or pipe(|bar)
$regex = "/\[\[($nc+:$tc+)(?:#.*?)?(?:\\|.*?)?]]/";