Bug 1691 - Clarify escaping
Summary: Clarify escaping
Status: RESOLVED MOVED
Alias: None
Product: Specifications
Classification: Unclassified
Component: desktop-entry (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Allison Lortie (desrt)
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-22 08:13 UTC by Owen Taylor
Modified: 2019-02-16 12:27 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Owen Taylor 2004-10-22 08:13:47 UTC
The specification says:

 The escape sequences \s, \n, \t, \r, and \\ are supported, 
 meaning ASCII space, newline, tab, carriage return, and backslash, 
 respectively.

Which is really insufficient because it doesn't specify what to do
with \ in other contexts.

I'd suggest adding:

 These escape sequences may only occur in values of type string or localestring
 and may not occur in keys, group names, or elsewhere in the desktop file
 except in comments, where no interpretation is performed.

 The combination \; can occur only for values which are ; separated
 lists. (See below.)

 Use of \ in combination with any other character is reserved; future 
 versions of this specification or future specifications based on 
 this basic file format may assign meaning to such combinations in
 new fields, however they must not be used in fields currently specified
 in this specification.
Comment 1 Vincent Untz 2007-03-20 11:24:41 UTC
Mass-reassign to me.
I'll look at the bugs there soon, and forward them to the xdg list.
Comment 2 Alex Sokoloff 2012-02-07 09:33:46 UTC
Also, this location is unclear. 

**The Exec key**
...
Quoting must be done by enclosing the argument between double quotes and escaping the double quote character, backtick character ("`"), dollar sign ("$") and backslash character ("\") by preceding it with an additional backslash character. Implementations must undo quoting before expanding field codes and before passing the argument to the executable program. Reserved characters are space (" "), tab, newline, double quote, single quote ("'"), backslash character ("\"), greater-than sign (">"), less-than sign ("<"), tilde ("~"), vertical bar ("|"), ampersand ("&"), semicolon (";"), dollar sign ("$"), asterisk ("*"), question mark ("?"), hash mark ("#"), parenthesis ("(") and (")") and backtick character ("`").

Why escaped 4 symbols, but unescaped 8?

And the main question, what should to do with non escaped symbols? If we have a string "$some\line", which should be the result?
Comment 3 Vincent Untz 2015-09-18 09:41:37 UTC
Sorry for the noise, reassigning to new (since 2 years) maintainers (Ryan & David).
Comment 4 GitLab Migration User 2019-02-16 12:27:18 UTC
-- 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/desktop-file-utils/issues/49.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.