Open blindspeed90 opened 5 years ago
Hello,
could you provide example HTML which is affected by the pastefromword
plugin?
<font>
is deprecated, but I actually wasn't even testing it. IE11 (didn't try others) returns a <font>
tag for <sub>/<sup>
, which causes the plugin to think this came from MSWord, so it bypasses the paste filtering because of the dontFilter being set. Also an explicit use of it, albeit old HTML code, would cause this.Sorry my last bullet looks whacky, I guess GitHub isn't properly escaping LT and GT!
One more thing, I just did a Shift+Insert, I didn't use the buttons. If I clicked the PasteFromWord button, I'd understand if this happens as I assume the request would go directly to that plugin.
@blindspeed90 you have to wrap HTML content with backticks, otherwise, it will be parsed by markdown :)
I can reproduce the issue, thanks for the samples!
Type of report
Bug
Provide detailed reproduction steps (if any)
The "wordRegexp" shouldn't have the ending "|<\/font>". In my case I had plain HTML with a font specified, nothing MSOffice specific. It thinks the HTML is from Word, and sets the dontFilter=true, which sidesteps the config.pasteFilter work in the clipboard plugin code "if ( transferType == CKEDITOR.DATA_TRANSFER_EXTERNAL && editor.pasteFilter && !dataObj.dontFilter )".
Expected result
It shouldn't think the use of is specific to Word.
Actual result
It thinks the HTL is from Word, and skips the filtering.
Other details