Merge pull request #168 from mathjazz/hotfix-xss-iframe

Avoid some tags when detecting hooks
This commit is contained in:
Matjaž Horvat 2015-09-15 01:20:40 +02:00
Родитель f970a3a477 c3d1c62b32
Коммит 81462614ef
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -262,7 +262,7 @@
l10n = {};
// Create object with l10n comment nodes
$('*').contents().each(function () {
$(':not("script, style, iframe, noscript, [translate=\'no\']")').contents().each(function () {
if (this.nodeType === Node.COMMENT_NODE && this.nodeValue.indexOf('l10n') === 0) {
var element = $(this).parent();
$(this).remove();
@ -688,7 +688,7 @@
var hooks = false;
// Detect hooks
$("*").contents().filter(function () {
$(':not("script, style, iframe, noscript, [translate=\'no\']")').contents().filter(function () {
return this.nodeType == 8;
}).each(function (i, e) {
if (e.nodeValue.indexOf('l10n') !== -1) {