better fix for #24331
authorMark Wells <mark@freeside.biz>
Fri, 13 Feb 2015 01:08:27 +0000 (17:08 -0800)
committerMark Wells <mark@freeside.biz>
Fri, 13 Feb 2015 01:08:27 +0000 (17:08 -0800)
httemplate/elements/ckeditor/plugins/blockprotect/plugin.js

index 376d2bc..e4ef391 100644 (file)
@@ -7,6 +7,7 @@
         var delim_c = '}';
 
         var create_block = function(content, inside) {
+          if (inside) return content;
           // fix nbsp's
           content = content.replace(/&nbsp;/gi, ' ');
           // escape the content
             el.innerText = content;
           }
           el.setAttribute('class', 'cke_blockprotect');
-          if (inside) {
-            return el.innerHTML; // escapes the contents but doesn't wrap
-                                 // them in a <span>
-          } else {
-            return el.outerHTML;
-          }
+          return el.outerHTML;
         };
         var block_writeHtml = function( element ) {
           // to unescape the element contents, write it out as HTML,