Uploaded image for project: 'JBoss Web Server'
  1. JBoss Web Server
  2. JWS-840

JWS4 - ASF Bug 57136 – EL Parser escaping dollar sign not ${ or ${...}

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • JWS 4.0.0 CR1
    • tomcat

      ASF Bug 57136 – EL Parser escaping dollar sign not ${ or ${...}

      Ensure only \${ and \#{ are treated as escapes for ${ and #{ rather than \$ and \# being treated as escapes for $ and # when processing literal expressions in expression language.

      In the EL 3.0 spec it says...

      Alternatively, the escape characters \$ and # can be used to escape what would
      otherwise be treated as an eval-expression. Given the literal-expressions:
      \${exprA}
      \#{exprB}
      The resulting values would again be the strings ${exprA} and #{exprB}.

      That means it should not escape lets say "Price: $500.00" it should instead output "Price: $500.00"(it currently would output "Price: $500.00") but should instead escape "Price: ${500.00}" and the output of that would be "Price: ${500.00}".

      Normally this wouldn't be run into, but I happened to run into this issue passing javascript code through the EL processor, that happens to have some escaped dollar signs inside some regex strings.

      It maybe a little more acceptable to use ${ and #{ as the escapes, as that is a better indication that there is about to be an expression

      https://bz.apache.org/bugzilla/show_bug.cgi?id=57136
      http://svn.apache.org/r1658351
      http://svn.apache.org/r1658940

              rhn-support-csutherl Coty Sutherland
              mmadzin@redhat.com Matus Madzin
              Matus Madzin Matus Madzin
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: