Open yin1999 opened 5 months ago
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:
src
image
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
http://localhost:5042/en-US/docs/Glossary/Bezier_curve
yarn start
Correctly handle this.
The function can not handle this, and log the warning message.
Desktop
Chrome
Stable
Android
No response
I'm not sure whether it's a better idea to restrict local image file names to only contain ascii characters. I have only found the above case so far.
The fixes in content:
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-encodedsrc
value to match theimage
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
yarn start
in mdn/contenthttp://localhost:5042/en-US/docs/Glossary/Bezier_curve
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