responsive-loader icon indicating copy to clipboard operation
responsive-loader copied to clipboard

Image srcSets not escaped, breaks on paths with spaces in them

Open grrowl opened this issue 5 years ago • 1 comments

Because srcSet's paths are not escaped, it will produce this invalid output;

<img 
  src="/_next/static/images/Review List-711-834bd42895bd86b4f618f1dedcf9df31.png" 
  srcSet="/_next/static/images/Review List-711-834bd42895bd86b4f618f1dedcf9df31.png 711w"
/>

resulting in this error in the conosle (in Chrome):

Dropped srcset candidate "/_next/static/images/Review"
Failed parsing 'srcset' attribute value since it has an unknown descriptor.

grrowl avatar May 09 '19 04:05 grrowl

I just discovered this is still an issue. For clarity, the correct output should be

<img 
  src="/_next/static/images/Review%20List-711-834bd42895bd86b4f618f1dedcf9df31.png" 
  srcSet="/_next/static/images/Review%20List-711-834bd42895bd86b4f618f1dedcf9df31.png 711w"
/>

TrevinAvery avatar Jul 09 '21 00:07 TrevinAvery