Files
reverse-engineering-anything/src/desktop
Heo Hao a44e705ad8 fix(desktop): skip only ASCII whitespace before a desktop entry key (#13126)
The key reader stripped each line with JavaScript's trimStart(), which also
removes Unicode spaces such as U+00A0 and U+3000. GLib skips only
g_ascii_isspace, so it keeps those bytes inside the key and the record never
matches Name= or Hidden=.

The drift had a safety direction: a line indented with U+00A0 and reading
Hidden=true was accepted as a hidden override by REA but never by the desktop
environment, so findHiddenDesktopEntry() claimed a deletion that GLib would not
honour. #12708 closed this for group headers by validating the captured padding
against GLib's ASCII set; the blank-line, comment and key checks still used the
Unicode-aware trim.

I now strip only [ \t\f\r] before deciding whether a line is blank, a comment
or a key, and hand that same string to the record matcher. ASCII indentation
still parses as before. The inventory test covers the refusal when a hidden
override carries the padding, and the domain tests cover the three Unicode
spaces for keys, blank lines and comments.
2026-11-21 19:40:34 +01:00
..