jakartaee / expression-language

Jakarta Expression Language
https://eclipse.org/ee4j/el
Other
68 stars 49 forks source link

Allow Java escape sequence in string literals #39

Closed glassfishrobot closed 4 years ago

glassfishrobot commented 10 years ago
Current RI only allows \" in a string "...", and \' in '...' and \\ in both.
The string "\n" causes a paring error.
  1. The current spec is not clear about what can be escaped. The spec should be clarified to allow Java escape sequences. Specifically, the escape sequences \t, \b, \n, \r and \f should be allowed.
  2. The RI should be fixed to implement the above.
glassfishrobot commented 6 years ago
glassfishrobot commented 10 years ago

@glassfishrobot Commented Reported by kchung

glassfishrobot commented 10 years ago

@glassfishrobot Commented cbauer123 said: And of course, you should be able to escape backslash-followed-by-curlybrace-open (no idea how to get this into the JIRA editor) properly.

https://java.net/jira/browse/UEL-34

glassfishrobot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA UEL-39

markt-asf commented 4 years ago

The spec allows for \' \" and \\ but only within a quoted string irrespective of whether single or double quotes is used. Given that this issue has been raised, there is scope to improve the spec language in this area.

If the range of allowed quoting is to be extended there needs to be a justification for doing so. My default preference would be not to change the current escaping.

markt-asf commented 4 years ago

The current text has been clarified. No justification has been provided for allowing Java escape sequences. If that is still a requirement for you, please open a new issue and provide as much detail as you can.