Opened 12 years ago
#9486 new Bug
Using CKEDITOR.templates for stylesheets
Reported by: | Piotrek Koszuliński | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 4.0 |
Keywords: | Cc: |
Description
In Moono skin we used CKEDITOR.templates to create content of CSS stylesheet. CSS uses '{' and it's also part of our wildcard, so we had to use trick to make it work.
There are couple of solutions:
- Escaping '{' by e.g. doubling. Note that escaping with '\' is not possible because it's also escape character in JS string.
- Specifying more precise regexp for template's wildcards, so e.g. only [a-zA-Z0-9]+ will be accepted.
- Changing wildcard format.
Solution first is ok, because it's backward compatible, but we will have to add more characters in our templates making them longer and less readable.
Third solution completely breaks backward compatibility so it's bad.
Second solution isn't fully backward compatible, but should work in 99% of cases (if we'll make good pattern) and it doesn't enlarge template and doesn't make it less readable.