Drew, I'm wondering if there's two separate issues: 1) About pages act inconsistently depending on case 2) Previous to my change, URL bar would show the "correct" lowercase about page as the heuristic result even if the user typed all caps, but post-change, if `ABOUT` is all caps, then it doesn't recognize `ABOUT` as a protocol. The error is likely happening because I neglected to [set the prefix to lowercase](https://searchfox.org/mozilla-central/rev/703391c381f92a73d9a938cbe0d33ca64d94583b/browser/components/urlbar/UrlbarUtils.jsm#984). I feel like the fix here is to add `.toLowerCase()` to `prefix` in the `includes` check and then add a test expecting only one result when typing an `about` page. There's still ways for users to fool the mechanism making the heuristic result show the corrected `about` result, namely typing an all caps protocol and a wrong path (e.g. `ABOUT:PRIVATEBROWSINGS`) and then deleting characters, but that seems like a super edge case.
Bug 1773298 Comment 9 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Drew, I'm wondering if there's two separate issues: 1) About pages act inconsistently depending on case 2) Previous to my change, URL bar would show the "correct" lowercase about page as the heuristic result even if the user typed all caps, but post-change, if `ABOUT` is all caps, then it doesn't recognize `ABOUT` as a protocol. The error is likely happening because I neglected to [set the prefix to lowercase](https://searchfox.org/mozilla-central/rev/703391c381f92a73d9a938cbe0d33ca64d94583b/browser/components/urlbar/UrlbarUtils.jsm#984). I feel like the fix here is for me to add `.toLowerCase()` to `prefix` in the `includes` check and then add a test expecting only one result when typing an `about` page. What do you think? There's still ways for users to fool the mechanism making the heuristic result show the corrected `about` result, namely typing an all caps protocol and a wrong path (e.g. `ABOUT:PRIVATEBROWSINGS`) and then deleting characters, but that seems like a super edge case.
Drew, I'm wondering if there's two separate issues: 1) About pages act inconsistently depending on case 2) Previous to my change, URL bar would show the "correct" lowercase about page as the heuristic result even if the user typed all caps, but post-change, if `ABOUT` is all caps, then it doesn't recognize `ABOUT` as a protocol. The error is likely happening because I neglected to [set the prefix to lowercase](https://searchfox.org/mozilla-central/rev/703391c381f92a73d9a938cbe0d33ca64d94583b/browser/components/urlbar/UrlbarUtils.jsm#984). I feel like the fix here is for me to add `.toLowerCase()` to `prefix` in the `includes` check and then add a test expecting only one result when typing an `about` page. Prefixes should be case insensitive and the canonical form of a prefix is lowercase so it stands to make sense that it should be lower-cased before checking. What do you think? There's still ways for users to fool the mechanism making the heuristic result show the corrected `about` result, namely typing an all caps protocol and a wrong path (e.g. `ABOUT:PRIVATEBROWSINGS`) and then deleting characters, but that seems like a super edge case.