Double escaping special characters in gallery image links in block editor
-
I’m using Dropbox image links in posts within the block editor. Now on the front end, the images appear fine, but on the editor screen the images don’t show up. The only way to get the image linked to render is by switching to code view and replacing
\u0026amp
with&
and there is no easy way for me to have to do that whenever I add a new image to a post. Oddly enough, images are rendering as expected inside the Classic Editor so I figured it has something to do with JavaScript and double escaping but I haven’t been able to figure out the source of the issue in the code. I notice this when I use any gallery blocks, single images are fine. Is there some type of escaping correction that can be done on the URLs for the images, this is an example (not real link):- Current behavior: https://www.dropbox.com/scl/fi/fdafdafdafda\u0026amp;raw=1
- Expected behavior: https://www.dropbox.com/scl/fi/fdafdafdafda&raw=1
- This is how I think the URL is stored in the database: https://www.dropbox.com/scl/fi/fdafdafdafda&raw=1
I’m wanting to fix this so that I can actually see the images in the block editor while editing to know how things are actually arranged. Appreciate any help you can provide and if this post belongs somewhere else, let me know.
- You must be logged in to reply to this topic.