Repository navigation
<img> srcset is not crawled when src is a data: URI
#1907
Unanswered
protonnegativo
asked this question in
Q&A
Replies: 1 comment
|
Your exact case now appears to be covered on There is also a I haven't run the fixture locally or verified which release first includes this change, so this confirms the inspected source/test rather than v1.8.0 behavior. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Katana version
devat df9988f (also v1.8.0).Current behavior
When an
<img>has adata:URI insrc, the URLs in itssrcsetare not crawled. Adata:placeholder insrcwith the real images insrcsetis a common lazy-loading pattern.bodyImgTagParserreturns from the per-element callback whensrcstarts withdata:, and thesrcsetcheck comes after it, so it is never reached:Steps to reproduce
Without the
data:src, bothsrcsetURLs are found.Expected behavior
The fix is to skip only the
data:srcinstead of the whole element. I have a small PR with a test ready.All reactions