summaryrefslogtreecommitdiff
path: root/inc/DifferenceEngine.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/DifferenceEngine.php')
-rw-r--r--inc/DifferenceEngine.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php
index e0fbf8e03..07df7a4be 100644
--- a/inc/DifferenceEngine.php
+++ b/inc/DifferenceEngine.php
@@ -817,7 +817,16 @@ class DiffFormatter {
$this->_added($closing);
}
- function _escape($str){
+ /**
+ * Escape string
+ *
+ * Override this method within other formatters if escaping required.
+ * Base class requires $str to be returned WITHOUT escaping.
+ *
+ * @param $str string Text string to escape
+ * @return string The escaped string.
+ */
+ function _escape($str){
return $str;
}
}
@@ -1004,6 +1013,8 @@ class InlineWordLevelDiff extends MappedDiff {
* "Unified" diff formatter.
*
* This class formats the diff in classic "unified diff" format.
+ *
+ * NOTE: output is plain text and unsafe for use in HTML without escaping.
*/
class UnifiedDiffFormatter extends DiffFormatter {