summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorMichael Hamann <michael@content-space.de>2013-04-21 12:58:46 -0700
committerMichael Hamann <michael@content-space.de>2013-04-21 12:58:46 -0700
commit9a1c1c52f3c70d6f48bdfc5d0c2cb88b61672088 (patch)
treeac62a692403dd2388bb2d702c0552308d352a161 /inc
parent313fdae7cd442f7ea3dedf764ee0cfd40e482fd9 (diff)
parentf755f63a3beef948a8d179c0e0860041f4f86db5 (diff)
downloadrpg-9a1c1c52f3c70d6f48bdfc5d0c2cb88b61672088.tar.gz
rpg-9a1c1c52f3c70d6f48bdfc5d0c2cb88b61672088.tar.bz2
Merge pull request #211 from splitbrain/nonwikidiffs
Fix double encoding of html diff output in syndicated feeds and subscrition emails
Diffstat (limited to 'inc')
-rw-r--r--inc/DifferenceEngine.php2
-rw-r--r--inc/subscription.php4
2 files changed, 4 insertions, 2 deletions
diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php
index e0fbf8e03..783d6bea5 100644
--- a/inc/DifferenceEngine.php
+++ b/inc/DifferenceEngine.php
@@ -1004,6 +1004,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 {
diff --git a/inc/subscription.php b/inc/subscription.php
index 2989de032..4248e4b11 100644
--- a/inc/subscription.php
+++ b/inc/subscription.php
@@ -408,8 +408,8 @@ class Subscription {
$tdiff = $dformat->format($df);
$DIFF_INLINESTYLES = true;
- $df = new Diff(explode("\n", hsc($old_content)),
- explode("\n", hsc($new_content)));
+ $df = new Diff(explode("\n", $old_content),
+ explode("\n", $new_content));
$dformat = new InlineDiffFormatter();
$hdiff = $dformat->format($df);
$hdiff = '<table>'.$hdiff.'</table>';