Encoding in pattern code breaks rawpixel URLs when copy/pasting pattern #488
Labels
[Component] Theme
The frontend of the pattern directory, pattern lists UI
[Type] Bug
Something isn't working
Rawpixel URLs are broken when copied in the pattern code (using the "copy" button), because the URL is being over-encoded.
For example, copy this pattern, which results in this code:
Pattern code
If you paste that as-is into WordPress, it results in two 403 errors, trying to get URLs like
https://img.rawpixel.com/s3fs-private/rawpixel_images/website_content/pd19-20011.jpg?w=1200&h=1200&fit=clip&crop=default&dpr=1&q=75&vib=3&con=3&usm=15&cs=srgb&bg=F4F4F3&ixlib=js-2.2.1&s=6be89633a3b20429853f6d3192649709
— note the&
s.If you replace
\u0026amp;
with&
in the pattern, then paste it in, the URLs requested become likehttps://img.rawpixel.com/s3fs-private/rawpixel_images/website_content/pd19-20011.jpg?w=1200&h=1200&fit=clip&crop=default&dpr=1&q=75&vib=3&con=3&usm=15&cs=srgb&bg=F4F4F3&ixlib=js-2.2.1&s=6be89633a3b20429853f6d3192649709
, and these resolve successfully.Props to @carolinan for flagging the issue.
The text was updated successfully, but these errors were encountered: