Fixed script tags recognized as dialog target
authorAlexander Ebert <ebert@woltlab.com>
Fri, 8 Mar 2013 01:40:10 +0000 (02:40 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 8 Mar 2013 01:40:10 +0000 (02:40 +0100)
wcfsetup/install/files/js/WCF.js

index 1fc7ca3ad71fe97319cc6fe8ad0f2402bbf57702..6d8a8067d47656745775beeab2933e88b1b76113 100755 (executable)
@@ -7573,6 +7573,19 @@ $.widget('ui.wcfDialog', {
                onShow: null
        },
        
+       /**
+        * @see $.widget._createWidget()
+        */
+       _createWidget: function(options, element) {
+               // ignore script tags
+               if ($(element).getTagName() === 'script') {
+                       console.debug("[ui.wcfDialog] Ignored script tag");
+                       return null;
+               }
+               
+               $.Widget.prototype._createWidget.apply(this, arguments);
+       },
+       
        /**
         * Initializes a new dialog.
         */