JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.0.2
[ckeditor.git] / _source / plugins / htmldataprocessor / plugin.js
index 3ec5db3..01be358 100644 (file)
@@ -199,7 +199,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                };\r
        }\r
 \r
-       var protectAttributeRegex = /<(?:a|area|img|input).*?\s((?:href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+)))/gi;\r
+       var protectAttributeRegex = /<(?:a|area|img|input)[\s\S]*?\s((?:href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+)))/gi;\r
 \r
        function protectAttributes( html )\r
        {\r
@@ -208,8 +208,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 \r
        var protectStyleTagsRegex = /<(style)(?=[ >])[^>]*>[^<]*<\/\1>/gi;\r
        var encodedTagsRegex = /<cke:encoded>([^<]*)<\/cke:encoded>/gi;\r
-       var protectElementNamesRegex = /(<\/?)((?:object|embed|param).*?>)/gi;\r
-       var protectSelfClosingRegex = /<cke:param(.*?)\/>/gi;\r
+       var protectElementNamesRegex = /(<\/?)((?:object|embed|param)[\s\S]*?>)/gi;\r
+       var protectSelfClosingRegex = /<cke:(param|embed)([\s\S]*?)\/?>/gi;\r
 \r
        function protectStyleTagsMatch( match )\r
        {\r
@@ -226,7 +226,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
        }\r
        function protectSelfClosingElements( html )\r
        {\r
-               return html.replace( protectSelfClosingRegex, '<cke:param$1></cke:param>' );\r
+               return html.replace( protectSelfClosingRegex, '<cke:$1$2></cke:$1>' );\r
        }\r
 \r
        function unprotectEncodedTagsMatch( match, encoded )\r