Opened 9 years ago
Last modified 7 years ago
#14615 confirmed Bug
protected source in attributes modified in custom html elements
Reported by: | Hubert Garrido | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 4.4.1 |
Keywords: | Cc: |
Description
With angular, it is a common practice to define new HTML elements, and it is also needed to protect angular code, but CKEditor change attributes if they are in a custom tag and protected with protectedSource
This bug is related to a previous one that changed attributes in regular HTML tags: https://dev.ckeditor.com/ticket/4475
Steps to reproduce
- protect angular code with the following in config:
protectedSource: [ /{{[\s\S]*?}}/g ]
- put the following in source:
<custom-directive data="{{ item }}">test</custom-directive> <div data="{{ item }}">test</div>
Expected result
<custom-directive data="{{ item }}">test</custom-directive> <div data="{{ item }}">test</div>
Actual result
<custom-directive data="<!--{cke_protected}%7B%7B%20item%20%7D%7D-->">test</custom-directive> <div data="{{ item }}">test</div>
Problem can be reproduced from CKEditor 4.4.1 in all browsers.
NOTES:
Custom block tags are not supported at the moment. For custom inline tags,
dtd
should be extended like so: