yari
yari copied to clipboard
The image flaw check function can not correctly handle the raw non-uri-encoded image src
Summary
The image flaw check function will use the uri-encoded src
value to check whether the characters in the value are completely lowercase, and use the uri-encoded src
value to match the image
type node. But in mdn/content, there are non-encoded URIs, which may cause the above check/match to fail. See:
https://github.com/mdn/content/blob/9657c42cc4f2afff708df107a92838a3dec8514c/files/en-us/glossary/bezier_curve/index.md?plain=1#L15
Related testing file: testing/content/files/en-us/glossary/bézier_curve/index.html
URL
http://localhost:5042/en-US/docs/Glossary/Bezier_curve
Reproduction steps
- Run
yarn start
in mdn/content - Go to
http://localhost:5042/en-US/docs/Glossary/Bezier_curve
- Check the logs in terminal, we will see: "Could not find enough matches for src: b%C3%A9zier_2_big.gif, index 0 out of bounds"
Expected behavior
Correctly handle this.
Actual behavior
The function can not handle this, and log the warning message.
Device
Desktop
Browser
Chrome
Browser version
Stable
Operating system
Android
Screenshot
No response
Anything else?
No response
Validations
- [X] I have read the Community Participation Guidelines.
- [X] I have verified that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] I have checked that this is a concrete bug. For Q&A open a GitHub Discussion.