Today I encountered the funniest bug ever at work.
There was one page that started showing a little Palestian flag 🇵🇸 in the top left corner of the screen, seemingly for no reason.
The cause of the bug turned out to be a left over debug echo in the page script.
Why the hell would this cause a Palestinian flag to be rendered?
* The echo gets inserted at the start of the page (before <!doctype html>).
* Doctype becomes invalid, browser goes into Quirks Mode.
* In Quirks Mode CSS classes become case insensitive.
* We have a FlagKit CSS file that defines classes for flags using two letter country codes with "PS" for "Palestine".
* We also have a CSS file for "Perfect Scrollbar" that has a shorthand CSS class called "ps".
* Quirks mode applied the "PS" styling to the "ps" tag.
Embed Notice
HTML Code
Corresponding Notice
- Embed this notice
SuperDicq (superdicq@minidisc.tokyo)'s status on Friday, 02-Aug-2024 22:53:35 JST SuperDicq