making AttachmentViewer testable
This commit is contained in:
@@ -1923,11 +1923,9 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
|
||||
* (view) Show attachment and preview if possible
|
||||
*
|
||||
* @name AttachmentViewer
|
||||
* @param {object} window
|
||||
* @param {object} document
|
||||
* @class
|
||||
*/
|
||||
var AttachmentViewer = (function (window, document) {
|
||||
var AttachmentViewer = (function () {
|
||||
var me = {};
|
||||
|
||||
var $attachmentLink,
|
||||
@@ -2085,7 +2083,7 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
|
||||
}
|
||||
|
||||
return me;
|
||||
})(window, document);
|
||||
})();
|
||||
|
||||
/**
|
||||
* (view) Shows discussion thread and handles replies
|
||||
|
||||
@@ -1444,7 +1444,7 @@ describe('PasteViewer', function () {
|
||||
'sanitizes XSS',
|
||||
jsc.elements(['plaintext', 'markdown', 'syntaxhighlighting']),
|
||||
'string',
|
||||
// https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
|
||||
// @see {@link https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet}
|
||||
jsc.elements([
|
||||
'<PLAINTEXT>',
|
||||
'></SCRIPT>">\'><SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT>',
|
||||
|
||||
Reference in New Issue
Block a user