From cb3d64cae95358905f836cafd570741fad1e8f5b Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Sun, 11 May 2014 15:31:17 -0700 Subject: [PATCH] Revert "Escape potentially malicious fields." This reverts commit 3f69b4d791a219d1d5a71c7abfeaa4390145756b. Conflicts: LICENSE builds/appchan-x.user.js builds/crx/script.js --- LICENSE | 2 +- builds/appchan-x.user.js | 14 ++------------ builds/crx/script.js | 14 ++------------ src/General/Build.coffee | 6 ------ 4 files changed, 5 insertions(+), 31 deletions(-) diff --git a/LICENSE b/LICENSE index accaa5bc0..63a41c12f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ /* -* appchan x - Version 2.9.26 - 2014-05-07 +* appchan x - Version 2.9.26 - 2014-05-11 * * Licensed under the MIT license. * https://github.com/zixaphir/appchan-x/blob/master/LICENSE diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index 125f45d4c..bd3100c6a 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -25,7 +25,7 @@ // ==/UserScript== /* -* appchan x - Version 2.9.26 - 2014-05-07 +* appchan x - Version 2.9.26 - 2014-05-11 * * Licensed under the MIT license. * https://github.com/zixaphir/appchan-x/blob/master/LICENSE @@ -5791,7 +5791,7 @@ return path; }, postFromObject: function(data, boardID) { - var key, o, safetyBuffer, _i, _len, _ref; + var o; o = { postID: data.no, threadID: data.resto || data.no, @@ -5810,16 +5810,6 @@ isSticky: !!data.sticky, isClosed: !!data.closed }; - safetyBuffer = $.el('div'); - _ref = ['name', 'subject']; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - key = _ref[_i]; - if (!o[key]) { - continue; - } - safetyBuffer.textContent = o[key]; - o[key] = safetyBuffer.innerHTML; - } if (data.ext || data.filedeleted) { o.file = { name: data.filename + data.ext, diff --git a/builds/crx/script.js b/builds/crx/script.js index 5015a12c9..72855929e 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1,6 +1,6 @@ // Generated by CoffeeScript /* -* appchan x - Version 2.9.26 - 2014-05-07 +* appchan x - Version 2.9.26 - 2014-05-11 * * Licensed under the MIT license. * https://github.com/zixaphir/appchan-x/blob/master/LICENSE @@ -5849,7 +5849,7 @@ return path; }, postFromObject: function(data, boardID) { - var key, o, safetyBuffer, _i, _len, _ref; + var o; o = { postID: data.no, threadID: data.resto || data.no, @@ -5868,16 +5868,6 @@ isSticky: !!data.sticky, isClosed: !!data.closed }; - safetyBuffer = $.el('div'); - _ref = ['name', 'subject']; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - key = _ref[_i]; - if (!o[key]) { - continue; - } - safetyBuffer.textContent = o[key]; - o[key] = safetyBuffer.innerHTML; - } if (data.ext || data.filedeleted) { o.file = { name: data.filename + data.ext, diff --git a/src/General/Build.coffee b/src/General/Build.coffee index 57fcf1d0b..ee3023c23 100755 --- a/src/General/Build.coffee +++ b/src/General/Build.coffee @@ -42,12 +42,6 @@ Build = isSticky: !!data.sticky isClosed: !!data.closed # file - - safetyBuffer = $.el 'div' - for key in ['name', 'subject'] when o[key] - safetyBuffer.textContent = o[key] - o[key] = safetyBuffer.innerHTML - if data.ext or data.filedeleted o.file = name: data.filename + data.ext