Cleanpaste cleans the already inserted text, not the newly pasted text.
See original GitHub issueWhen trying to use the Cleanpaste plugin (which is awesome by the way), the wrong text is cleaned;
So when I paste some text which is not clean (for example it has a style
attribute), the style attribute is pasted anyway, so the cleanpaste plugin is not picking it up.
However when I paste something again, next to the already pasted stuff, then the first text is cleaned.
To reproduce:
-
I copy
<p style="color:red;">This goes wrong</p>
from a rendered html page. (So you actually see red text) -
I paste it in an initialized Trumbowyg editor (Observe it is still red)
-
I copy
<p>Bladibla</p>
from a rendered html page -
I paste it in the same Trumbowyg editor.
-
Now the “This goes wrong” text gets cleaned.
I can reproduce this on Ubuntu, in Chrome, Firefox and Opera.
Any suggestions?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
It appears that the cleanpaste plugin no longer works? Tried debugging a bit and this code returns an empty string, not the pasted text / markup:
This is on firefox v93.0. Seem to happen in Chrome as well. Am wondering if it is disabled in the browser due to security concerns with d’n’d?
Deployed in 2.12.1