+ function protectReadOnly( element )\r
+ {\r
+ var attrs = element.attributes;\r
+\r
+ // We should flag that the element was locked by our code so\r
+ // it'll be editable by the editor functions (#6046).\r
+ if ( attrs.contenteditable != "false" )\r
+ attrs[ 'data-cke-editable' ] = attrs.contenteditable ? 'true' : 1;\r
+\r
+ attrs.contenteditable = "false";\r
+ }\r
+ function unprotectReadyOnly( element )\r
+ {\r
+ var attrs = element.attributes;\r
+ switch( attrs[ 'data-cke-editable' ] )\r
+ {\r
+ case 'true': attrs.contenteditable = 'true'; break;\r
+ case '1': delete attrs.contenteditable; break;\r
+ }\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 protectElementRegex = /<(a|area|img|input)\b([^>]*)>/gi,\r
+ protectAttributeRegex = /\b(on\w+|href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi;\r