+ function protectReadOnly( element )\r
+ {\r
+ element.attributes.contenteditable = "false";\r
+ }\r
+ function unprotectReadyOnly( element )\r
+ {\r
+ delete element.attributes.contenteditable;\r
+ }\r
+ // Disable form elements editing mode provided by some browers. (#5746)\r
+ for ( i in { input : 1, textarea : 1 } )\r
+ {\r
+ defaultDataFilterRules.elements[ i ] = protectReadOnly;\r
+ defaultHtmlFilterRules.elements[ i ] = unprotectReadyOnly;\r
+ }\r
+\r
+ var protectAttributeRegex = /<(?:a|area|img|input)[\s\S]*?\s((?:href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+)))/gi;\r
+\r
+ var protectElementsRegex = /(?:<style(?=[ >])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,\r
+ encodedElementsRegex = /<cke:encoded>([^<]*)<\/cke:encoded>/gi;\r
+\r
+ var protectElementNamesRegex = /(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,\r
+ unprotectElementNamesRegex = /(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi;\r
+\r
+ var protectSelfClosingRegex = /<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi;\r