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.
Comment | File | Size | Author |
---|---|---|---|
#2 | linkit-ckeditor-double-encoded-2875761-2.patch | 1.18 KB | dsnopek |
Comments
Comment #2
dsnopekHere's a patch that works in my testing!
Comment #3
anonThanks for patch.