From 93994b1320960eac4d24999310d8ff0a2063975c Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Wed, 10 May 2017 13:03:15 +0200 Subject: [PATCH] Eval script elemtents in HTML body response Signed-off-by: Lukas Reschke --- apps/updatenotification/js/admin.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/updatenotification/js/admin.js b/apps/updatenotification/js/admin.js index 589765348af64..93b42295a23c1 100644 --- a/apps/updatenotification/js/admin.js +++ b/apps/updatenotification/js/admin.js @@ -32,6 +32,13 @@ $(document).ready(function(){ var body = $('body'); $('head').remove(); body.html(data); + + // Eval the script elements in the response + var dom = $(data); + dom.filter('script').each(function() { + eval(this.text || this.textContent || this.innerHTML || ''); + }); + body.removeAttr('id'); body.attr('id', 'body-settings'); }