New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 650971 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Img srcset attribut fails to decode &

Reported by arthan...@googlemail.com, Sep 28 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36

Steps to reproduce the problem:
1. Create a img tag
2. Set a src attribute with a query string (e.g.: "/abc.jpg?h=150&s=b2416d3bffa603285670dc27402d1b6a").
3. Set a srcset attribute with a query string and an ampersand.
4. When opening the .html file the & is decoded in the src attribute but not the srcset attribute.

What is the expected behavior?
The $amp; in the srcset images should be decoded just like in the src attribute

What went wrong?
The browser uses a wrong url to request the image.

Did this work before? N/A 

Chrome version: 53.0.2785.116  Channel: stable
OS Version: OS X 10.12.0
Flash Version: Shockwave Flash 23.0 r0
 
Components: Blink>Image

Comment 2 by f...@opera.com, Sep 29 2016

Labels: Needs-Feedback
Could you provide an example? When trying to reproduce this I see entities being replaced as expected.
In the images I attached you can see that while the & is present in the src and srcset in the page source it is only replaced in the src attribute in the dom explorer.
page source.png
50.1 KB View Download
dom explorer.png
39.7 KB View Download
Project Member

Comment 4 by sheriffbot@chromium.org, Oct 6 2016

Labels: -Needs-Feedback Needs-Review
Owner: f...@opera.com
Thank you for providing more feedback. Adding requester "fs@opera.com" for another review and adding "Needs-Review" label for tracking.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 5 by f...@opera.com, Oct 6 2016

Status: WontFix (was: Unconfirmed)
Thank you for the screenshot. I see that you have:

"...h=150&..."

in the 'src', but:

"...h=150&..."

in 'srcset'. So the latter would end up as "&" after entity expansion ("&" -> "&"; second "amp;" unchanged.) Looks like whatever generated the srcset did entity encoding twice? (Maybe using the value of 'src' after entity encoding as the input?)

This looks like a WontFix.

Sign in to add a comment