This is a first for me. I’m using CKEditor to wrap
in a tag. Although the proper markup is being generated in the rendered page the code is missing.
If however I remove the matching brackets
so it’s just
it works. So obviously the brackets are the problem. I rather doubt it’s a CKEditor issue. Is there a way around this or are brackets illegal characters? I know as soon as I send this email I’ll find a solution.
It turns out the solution is not permanent, though it is a CKEditor issue.
CKEditor has a “Insert Special Characters” button which includes square brackets so that was the first thing I tried (it’s worked with every other character I’ve inserted). The brackets appeared in both the WYSIWYG editor and the editor source view, all of it wrapped in a code tag. But when the rendered page was viewed the entire code block was missing.
So I tried manually entering [ and ] in the source view and it worked, although the entities get converted back to square brackets in the editor source view so the problem is every time I edit anything on that page the code block goes missing again and I have to manually reenter the entities. If the entity would stay put in the source view it would be fine, I think.