As most are probably aware, the [ x"$var" = x"bar" ] convention used in many of the xdg-utils scripts is a rather ludicrous compatibility measure that only makes sense if extremely ancient Bourne shells need to be considered (which are themselves incompatible in many ways with such supposedly POSIX-compliant shells as Dash).
If that's the general attitude, that's ok, but the fact that old-style POSIX [ tests are broken in many places due to use of the == operator indicates that nobody really cares about compatibility anyway. Any such test will fail on all but Bash/Korn family shells' built-in test variants, and Gnu coreutils standalone "test" command which allow the == operator as a non-standard extension. Dash doesn't allow this, and neither would any of the multiple-decades-old shells that might require the ugly x"$var" hack.
I could go through and fix all these if anyone really wants, but it should be a simple enough task. I only bring it up after running across Freenode folks on more than one occasion who feel the need to stick to this (AFAICT) unwritten convention only to increase the likelihood that their patches are accepted.
I personally don't care about carrying the compatibility measures around forever either. If you don't mind doing the work creating a patch to address the issues you posed, I'll be happy to review/commit it.
-- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xdg/xdg-utils/issues/57.