If you insert a link in WYSIWYG without selecting an text first, Linkit will use the result title from the autocomplete as the link text. So, if you want to insert a link to a node with the title "You & me" it should use that as the link text. It works fine with TinyMCE, but inserts the text double encoded as "You & me" with CKEditor.

The autocomplete callback always returns the title encoded already, so the JSON is like [{"title": "You & me"}] which is fine - this is what is expected when rendering the autocomplete, and works fine with TinyMCE.

It's CKEditor that is expecting to receive un-encoded input, so I think the fix is to decode the text before inserting in the CKEditor plugin. I'll post a patch in a little bit.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dsnopek created an issue. See original summary.

dsnopek’s picture

Status: Active » Needs review
FileSize
1.18 KB

Here's a patch that works in my testing!

anon’s picture

Status: Needs review » Fixed

Thanks for patch.

  • anon committed 6342724 on 7.x-3.x authored by dsnopek
    Issue #2875761 by dsnopek: Link text is double encoded with CKEditor
    

Status: Fixed » Closed (fixed)

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