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:

  1. Create a new node
  2. Use Media to embed an image in the Body, and "override" the alt text with: Foo & Bar
  3. Save the node
  4. Edit the node
  5. 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.

CommentFileSizeAuthor
#2 some_characters_in-2835780-2.patch926 bytesbrockfanning

Comments

brockfanning created an issue. See original summary.

brockfanning’s picture

Issue summary: View changes
Status: Active » Needs work
StatusFileSize
new926 bytes

Here is a patch that depends on another patch from Media: #2833205: Allow for some escaping when overriding fields in WYSIWYG

brockfanning’s picture

Status: Needs work » Needs review

I've been testing this as part of #2832540: WYSIWYG encoding/token issues - general approach, and have not seen any regressions.

brockfanning’s picture

Status: Needs review » Reviewed & tested by the community

joseph.olstad’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.