Changed Roo/HtmlEditorCore.js
authorAlan <alan@roojs.com>
Wed, 16 Mar 2022 09:02:17 +0000 (17:02 +0800)
committerAlan <alan@roojs.com>
Wed, 16 Mar 2022 09:02:17 +0000 (17:02 +0800)
Roo/HtmlEditorCore.js

index ff6ff0d..d3bdea1 100644 (file)
@@ -588,7 +588,7 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component,  {
             var parser = new Roo.rtf.Parser(cd.getData('text/rtf'));
             images = parser.doc ? parser.doc.getElementsByType('pict') : [];
         }
             var parser = new Roo.rtf.Parser(cd.getData('text/rtf'));
             images = parser.doc ? parser.doc.getElementsByType('pict') : [];
         }
-        Roo.log(images);
+        //Roo.log(images);
         //Roo.log(imgs);
         // fixme..
         images = images.filter(function(g) { return !g.path.match(/^rtf\/(head|pgdsctbl|listtable|footerf)/); }) // ignore headers/footers etc.
         //Roo.log(imgs);
         // fixme..
         images = images.filter(function(g) { return !g.path.match(/^rtf\/(head|pgdsctbl|listtable|footerf)/); }) // ignore headers/footers etc.
@@ -632,6 +632,8 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component,  {
             new Roo.htmleditor.FilterSpan({ node : d });
             new Roo.htmleditor.FilterLongBr({ node : d });
             new Roo.htmleditor.FilterComment({ node : d });
             new Roo.htmleditor.FilterSpan({ node : d });
             new Roo.htmleditor.FilterLongBr({ node : d });
             new Roo.htmleditor.FilterComment({ node : d });
+            
+            
         }
         if (this.enableBlocks) {
                 
         }
         if (this.enableBlocks) {
                 
@@ -653,6 +655,11 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component,  {
             Roo.htmleditor.Block.initAll(this.doc.body);
         }
         
             Roo.htmleditor.Block.initAll(this.doc.body);
         }
         
+        try {
+            new Roo.htmleditor.FilterFileWarning({ node : d });
+        } catch(e) {
+            Roo.MessageBox.alert("Invalid URLS in content", "The pasted Content contains file:// URLS - you probably want to check all the links in this file");
+        }
         
         e.preventDefault();
         return false;
         
         e.preventDefault();
         return false;