summaryrefslogtreecommitdiff
path: root/includes/parser
diff options
context:
space:
mode:
Diffstat (limited to 'includes/parser')
-rw-r--r--includes/parser/Parser.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 2a24bee7..10765de2 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -490,6 +490,11 @@ class Parser {
"Highest expansion depth: {$this->mHighestExpansionDepth}/{$this->mOptions->getMaxPPExpandDepth()}\n".
$PFreport;
wfRunHooks( 'ParserLimitReport', array( $this, &$limitReport ) );
+
+ // Sanitize for comment. Note '‐' in the replacement is U+2010,
+ // which looks much like the problematic '-'.
+ $limitReport = str_replace( array( '-', '&' ), array( '‐', '&' ), $limitReport );
+
$text .= "\n<!-- \n$limitReport-->\n";
}
$this->mOutput->setText( $text );