Closed dm0 closed 9 years ago
Can you describe the steps to reproduce the problem and also post you editor config?
I believe editor config is not important. Steps to reproduce: Add following code to the top of page source on demo page (http://w8tcha.github.io/CKEditor-TextSelection-Plugin/demoCodeMirror.html):
<style type="text/css">
.someClass {
width: 100%;
}
</style>
Leave text cursor inside style tag (i.e. put it after semicolon). Switch to wysiwyg mode.
Error reported by browser is not always accurate, but failing call is:
decodeURIComponent(startNode.$.nodeValue)
Reason - nodeValue of style tag doesn't contain valid URL-enoded data (it has percent sign followed by semicolon)
I have a fix for this problem in my fork, but it is not well-tested yet, so i'm not sure if everything is ok.
fork is here: https://github.com/dm0/CKEditor-TextSelection-Plugin
Also in my fix I attempted to resolve problem of empty lines addition to source code of style and script tags.
Thanks now i was able to reproduce the issue, but you fix attempt doesn't seem to work.
I replaced decodeURIComponent with unescape and now it seem to work
the following sample (source) causes decodeURIComponent failure.