Mantis - Quercus
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
1935 | major | always | 08-10-07 15:51 | 09-07-07 00:55 | |
|
|||||
Reporter: | rjc | Platform: | |||
Assigned To: | nam | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | 3.1.2 | ||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 3.1.3 | ||
|
|||||
Summary: | 0001935: Backreferences in regexps broken in Quercus/Resin 3.1.2 | ||||
Description: |
MediaWiki allows you to edit a particular section of wikitext (instead of the whole document), by section. Sections are delimited by syntax like: == Section 1 == foo bar === Subsection 1.2 === baz When invoking index.php?action=edit§ion=1, MediaWiki invokes the function extractSections() in Parser.php. The regular expression used to extract sections in this function fails in Resin 3.1.2, but works fine in Resin 3.1.1. Here is the Regexp: $secs = preg_split( "/ ( ^ (?:$comment|<\/?noinclude>)* # Initial comments will be stripped (=+) # Should this be limited to 6? .+? # Section title... \\2 # Ending = count must match start (?:$comment|<\/?noinclude>|[ \\t]+)* # Trailing whitespace ok $ | <h([1-6])\b.*?> .*? <\/h\\3\s*> ) /mix", $striptext, -1, PREG_SPLIT_DELIM_CAPTURE); I have narrowed it down to the following simpler case: $striptext = "=== foo ===\nfoo\n=== bar ===\nbar\n"; $secs = preg_split( "/^(=+)[^=]+?\\1/mix", $striptext, -1); This fails as well. |
||||
Steps To Reproduce: | |||||
Additional Information: | |||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|