]> source.dussan.org Git - nextcloud-server.git/commitdiff
Eval script elemtents in HTML body response 4762/head
authorLukas Reschke <lukas@statuscode.ch>
Wed, 10 May 2017 11:03:15 +0000 (13:03 +0200)
committerLukas Reschke <lukas@statuscode.ch>
Wed, 10 May 2017 11:03:15 +0000 (13:03 +0200)
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
apps/updatenotification/js/admin.js

index 589765348af647c291c2021f94a7d7c016253ff3..93b42295a23c170d42ccd1b46e462b24a8f3c153 100644 (file)
@@ -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');
                                        }