r5234 MediaWiki - Code Review archive
Repository:
MediaWiki
Revision:
<
r5233
|
r5234
|
r5235
>
Date:
05:53, 15 September 2004
Author:
jeluf
Status:
old
Tags:
Comment:
BUG#487
make regex not-so-greedy. If anchored to end-of-line, several lines are eaten if
there is text following the comment
Modified paths:
/trunk/phase3/includes/Parser.php
(modified) (
history
)
Diff
[
purge
]
Index: trunk/phase3/includes/Parser.php
—
—
@@ -1784,7 +1784,7 @@
1785
1785
$htmlattrs = $this->getHTMLattrs () ;
1786
1786
1787
1787
# Remove HTML comments
1788
- $text = preg_replace( '/(\\n *<!--.*--> *(?=\\n)|<!--.*-->)/sU', '$2', $text );
1788
+ $text = preg_replace( '/(\\n *<!--.*--> *|<!--.*?-->)/sU', '', $text );
1789
1789
1790
1790
$bits = explode( '<', $text );
1791
1791
$text = array_shift( $bits );
Follow-up revisions
Revision
Commit summary
Author
Date
r5320
BUG#487
Use Wil's custom function to replace HTML comments instead of...
jeluf
06:17, 20 September 2004
Status & tagging log
01:56, 13 October 2010
😂
(
talk
|
contribs
)
changed the
status
of r5234
[
removed:
new
added:
old]