Problem/Motivation
When certain characters, such as & or <, are entered into overridden field input, the token that is created is not recognized by CKEditor the next time the content is edited. This causes the token to display in the WYSIWYG, rather than being converted into a CKEditor widget.
To recreate:
- Create a new node
- Use Media to embed an image in the Body, and "override" the alt text with: Foo & Bar
- Save the node
- Edit the node
- Notice that rather than seeing the normal image placeholder in the Body, you only see the raw token
Proposed resolution
Deal with these characters as the input is being converted into a token.
Remaining tasks
1. Wait for #2833205: Allow for some escaping when overriding fields in WYSIWYG
2 .Write a patch
3. Review this patch.
User interface changes
None.
API changes
None.
Data model changes
This will alter the behavior of token generation by escaping some characters.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | some_characters_in-2835780-2.patch | 926 bytes | brockfanning |
Comments
Comment #2
brockfanning commentedHere is a patch that depends on another patch from Media: #2833205: Allow for some escaping when overriding fields in WYSIWYG
Comment #3
brockfanning commentedI've been testing this as part of #2832540: WYSIWYG encoding/token issues - general approach, and have not seen any regressions.
Comment #4
brockfanning commentedComment #6
joseph.olstadrelease to follow shortly
please see follow up issue here:
#2838905: update book page documentation for media installation and setup of media module with or without media_ckeditor and ckeditor