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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • JWS 3.0.2 GA
    • JWS 3.0.1 DR1
    • tomcat7
    • None
    • Release Notes
    • Documented as Resolved Issue

      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

            dknox_jira David Knox (Inactive)
            dknox_jira David Knox (Inactive)
            Bogdan Sikora Bogdan Sikora (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: