#11672 closed Bug (duplicate)
EJS templates not preserved by protectedsource
Reported by: | Goran | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Cc: |
Description
I am using CKEditor 4.3.3 (revision 7841b02) (currently the latest revision) on my web app. I have used the protecedsource to escape EJS templates (<%= ... %>), and here is a copy of the regEx used:
protectedSource: [/<%[\s\S]*?%>/g, / /g]
The problem appears when switching between source and wysiwyg editor. When the html code in source editor is in this format:
<div style="color: #aaaaaa;"> <a href="<%= link(1) %>">Test link</a> </div>
it all works normally. However, when html is in this format:
<div style="color: #aaaaaa;"><a href="<%= link(1) %>">Test link</a> </div>
after switching to wysiwyg and back to source, it changes to this:
<div style="color: #aaaaaa;"> <a href="<!--{cke_protected}%3C%25%3D%20link(1)%20%25%3E-->">Test link</a> </div>
This way all html made with EJS templates becomes broken. I am including screenshots of the issue. Is there any way that this problem could be solved?
Attachments (2)
Change History (4)
Changed 11 years ago by
Attachment: | EJS protectedsource 2.jpg added |
---|
Changed 11 years ago by
Attachment: | EJS protectedsource 1.jpg added |
---|
comment:1 Changed 11 years ago by
Keywords: | EJS template protectedsource removed |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
Version: | 4.3.3 |
I'm happy to say that this issue was already fixed in #9205 which will be released in CKEditor 4.3.4 on 25th of March.