Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[el-dev] Updating the text about escaping

Hi,

This originated with:
https://github.com/eclipse-ee4j/el-ri/issues/42

The area clarification is required is the handling of literal text. In
stand-alone EL it is simple, the EL escaping rules apply.

Where clarification is required is when EL is integrated into other
technologies, such as JSP. The rules of escaping literal text will
depend on who EL is integrated into the other technology. In the case of
JSP, the JSP spec (that defines the integration of EL) states that the
EL spec only applies once inside ${...} or #{...}. Outside those
constructs, the JSP spec (with its slightly different escaping rules)
applies.

I'd like to propose adding the following text:

At the end of section 1.2.2

=== draft start ===
Note that when EL is integrated into other technologies, such as JSP,
that integration may not include Literal Expressions. Where integrations
do not include Literal Expressions, those integrating technologies will
define their own specification, including escaping rules, for handling
text outside of EL and the escaping rules described above will not apply.
===  draft end  ===


Ah, there was a need for clarification identified in #39 as well. For
that, I'd like to propose the following:

In section 1.3 replace the text
<quote>
String - With single and double quotes - " is escaped as \", ' is
escaped as \', and \ is escaped as \\. Quotes only need to be escaped in
a string value enclosed in the same type of quote
</quote>

=== draft start ===
String - Enclosed with single or double quotes with the following rules
for escaping within the enclosed string:
 - \ must be escaped as \\
 - " must be escaped as \" when the string is enclosed with "
 - ' must be escaped as \' when the string is enclosed with '
 - " may be escaped as \" when the string is enclosed with '
 - ' may be escaped as \' when the string is enclosed with "
 - no other escaping is permitted within a string
===  draft end  ===


Mark




Back to the top