I was having some issues where previously embedded media items wouldn't open the style popup with the previous values. The request to `/media/{id}/format-form` to retrieve the form was always returning the default form. I found that fields containing a ampersands ('&') or a non-breaking spaces ( ) were causing this since they weren't being properly escaped before being included in the url.

The field data object is only being stringified but not escaped as a url component.

Comments

jonathanpglick’s picture

Issue summary: View changes
jonathanpglick’s picture

Status: Active » Needs review
StatusFileSize
new1.03 KB

Here's a patch that fixes the issue. Let me know if there's a better way to be doing this and I'll update the patch.

mglaman’s picture

Status: Needs review » Reviewed & tested by the community

Applied cleanly, works for me.

leksat’s picture

Confirming working solution.

dave reid’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed #1 to 7.x-2.x. Does this need to be backported to 7.x-1.x at all?

dave reid’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Patch (to be ported) » Fixed

Does not look like this applies to 7.x-1.x.

Status: Fixed » Closed (fixed)

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