xdg-open only substitutes field codes that are surrounded by spaces
xdg-open
only substitutes field codes such as %f
if they are separate arguments, i.e. if they are surrounded by spaces.
This works:
Exec=foo --bar %f
This doesn't work:
Exec=foo --bar=%f
The Desktop Entry Specification does not seem to mention that field codes have to be surrounded by spaces. Other openers such as gio open
do not have this limitation.