0

Using Drupal version - 8.7.4. Added a 'Text (plain, long)' field for news summary to news content type.

There is a news view that shows all recent news items with the summary.

I created a new news item and pasted the summary from a document from Google Drive.

The apostrophe shows up as ' on the view but in the drupal edit page, it shows a '

Any thoughts on why this is happening? Any solutions? I am completely clueless. Thanks for reading.

  • It's being escaped. – Kevin Oct 10 at 20:39
0

This is a known issue with CKEditor.

In your case, the ampersand character & is being escaped as & which is causing the HTML entity for your apostrophe to appear as '.

The entity for the ampersand is well-formed, so the ampersand appears in your rendered output. But this causes the entity for the apostrophe to be malformed, so it appears as a literal string.

There's a CKEditor config that you can do to force a simple ampersand, but I'm not sure how it will affect other text fields site-wide (which will no longer have their ampersands escaped), so proceed with caution.

Perhaps someone with more CKEditor experience can tell us if there's a way to configure this more narrowly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.