Using the new functionality in #1942688: Documents embedded in WYSIWYG get converted to HTML by the editor, if you add a link to a document and change the link text to something like "One & Two", the ampersand will appear as an encoded & after you save it. And each time you load the WYSIWYG and save again, it will get encoded again.

Comments

David_Rothstein’s picture

Status: Active » Needs review
StatusFileSize
new768 bytes

Here is a patch.

aaron’s picture

genjohnson’s picture

Status: Needs review » Reviewed & tested by the community

The patch in #1 works for me.

aaron’s picture

Status: Reviewed & tested by the community » Fixed
dave reid’s picture

Priority: Normal » Major
Status: Fixed » Needs work

I believe this should actually be using the proper reverse of check_plain(), which is decode_entities.

gmclelland’s picture

Status: Needs work » Needs review
StatusFileSize
new619 bytes

@Dave Reid - untested but will this work?

aaron’s picture

Status: Needs review » Needs work

I get the original reported behavior with or without this patch applied.

genjohnson’s picture

Status: Needs work » Needs review

The patch in #6 is resolving the original reported behavior for me.

bneil’s picture

Status: Needs review » Reviewed & tested by the community

I have also tested #6 and have found no regressions to the functionality.

dave reid’s picture

Status: Reviewed & tested by the community » Fixed

Committed #6 to 7.x-2.x. Thanks everyone! http://drupalcode.org/project/media.git/commit/f6874c2

Status: Fixed » Closed (fixed)

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