shields
shields copied to clipboard
This page crashed. URI malformed
Are you experiencing an issue with...
shields.io
๐ Description
When using the badge maker/tester UI at https://shields.io/badges, the page instantly crashes if the user attempts to input an emoji into the topmost field, showing the message "This page crashed. URI malformed"
๐ Link to the badge
๐ก Possible Solution
Something's presumably choking on extra-long unicode characters such as emojis. Will investigate further
I just tried to reproduce this and I am not seeing this issue
Are you able to provide any additional info? Whta browser/OS are you using? I'd guess this might be something that only affects a subset of browsers?
So far I've only reproduced this bug on Microsoft Edge (Version 114.0.1823.36 64-bit) on Xbox One, I can check to see if there's any other browsers that do it as well. I've tested it on Chrome 114 on Android 9 and was unable to reproduce.
Update, the crash only occurs when typing in an emoji in the box, if I paste a complete set of params all at once such as ๐คจ-interesting-blue
it works fine and doesn't crash.
Upon further inspection, even when I paste in ๐คจ
by itself, it doesn't crash. It only seems to happen using the system UI to enter an emoji though the built-in emoji keyboard. I'm going to have to check to see if this occurs on other Windows environments with similar keyboards such as Windows 10.
Will update with any new info.
Cool, was able to reproduce on win10 just now, I did not have an issue with regular emoji or win+. emoji It only happend when using the on-screen keyboard, i use it lots for VR. It happends on edge and chrome
edit: confirmed for firefox My intuition tells me its something with docusaurus/its plugins but i can't tell yet, might be related to shields.io implementation as well.
Was able to confirm it in the demo of https://github.com/cloud-annotations/docusaurus-openapi plugin we use:
- go to the demo at https://docusaurus-openapi.netlify.app/cos/create-a-bucket
- Insert emoji using the built in on screen win10 keyboard in the first input field on the side menu
- Same issue:
I will open an issue on the plugin repo
I found the bug on docusaurus-openapi, this is the result of onInput for UTF-16 encoded emoji by the keyboard, The current on input solution tries to translate those to URI which fails and results in this error. I will PR a solution today or tomorrow.
This took longer than I wanted it to, but the fix for this is now deployed