From a77971b60035d72465d209dee73857fd3f2a457c Mon Sep 17 00:00:00 2001 From: Alan Date: Wed, 16 Mar 2022 17:02:17 +0800 Subject: [PATCH] Changed Roo/HtmlEditorCore.js --- Roo/HtmlEditorCore.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Roo/HtmlEditorCore.js b/Roo/HtmlEditorCore.js index ff6ff0db36..d3bdea105b 100644 --- a/Roo/HtmlEditorCore.js +++ b/Roo/HtmlEditorCore.js @@ -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') : []; } - 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. @@ -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 }); + + } if (this.enableBlocks) { @@ -653,6 +655,11 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component, { 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; -- 2.39.2