]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js
WordPress 3.4.2
[autoinstalls/wordpress.git] / wp-includes / js / tinymce / plugins / wpeditimage / editor_plugin_src.js
index c241158d322937e57b0fff79438c4020b9bee132..f771fc939624e06969800ef8d398351dddcc83f5 100644 (file)
                                var id, cls, w, cap, div_cls, img, trim = tinymce.trim;
 
                                id = b.match(/id=['"]([^'"]*)['"] ?/);
-                               b = b.replace(id[0], '');
+                               if ( id )
+                                       b = b.replace(id[0], '');
 
                                cls = b.match(/align=['"]([^'"]*)['"] ?/);
-                               b = b.replace(cls[0], '');
+                               if ( cls )
+                                       b = b.replace(cls[0], '');
 
                                w = b.match(/width=['"]([0-9]*)['"] ?/);
-                               b = b.replace(w[0], '');
+                               if ( w )
+                                       b = b.replace(w[0], '');
 
                                c = trim(c);
                                img = c.match(/((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)([\s\S]*)/i);