FilterPane Plugin
  1. FilterPane Plugin
  2. GPFILTERPANE-79

${g.datePicker(ctrlAttrs)} in _dateControl.gsp causes html double encoding when using grails.views.default.codec = "html"

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: Grails-FilterPane 2.0, Grails-FilterPane 2.0.1
    • Fix Version/s: Grails FilterPane 2.0.2
    • Labels:
      None
    • Patch attached:
      Yes

      Description

      grails.views.default.codec = "html" in grails-app/conf/Config.groovy is useful for having the ${} expressions in views automatically do html escaping.
      but if you a wrap method-style tag calls into ${} having set that config you get double-html-escaped ouput which renders the date fields unuseable.

      a working solution, for example, would be to replace
      $

      {g.datePicker(ctrlAttrs)}

      with
      <% g.datePicker(ctrlAttrs) %>
      in _dateControl.gsp

        Activity

        Hide
        zyro added a comment -

        it should be <%= g.datePicker(ctrlAttrs) %>

        Show
        zyro added a comment - it should be <%= g.datePicker(ctrlAttrs) %>
        Hide
        Jay Kraly added a comment -

        In Grails 2.3.4 I had to change the scriptlets codec to none as a work-around.

        codecs {
        expression = 'html' // escapes values inside ${}
        scriptlet = 'none' // escapes output from scriptlets in GSPs

        Filterpane is great but I wouldn't be able to use this in production as-is. Luckily I'm just evaluating Grails (and Filterpane) at this point.

        Show
        Jay Kraly added a comment - In Grails 2.3.4 I had to change the scriptlets codec to none as a work-around. codecs { expression = 'html' // escapes values inside ${} scriptlet = 'none' // escapes output from scriptlets in GSPs Filterpane is great but I wouldn't be able to use this in production as-is. Luckily I'm just evaluating Grails (and Filterpane) at this point.

          People

          • Assignee:
            Steve Krenek
            Reporter:
            zyro
          • Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: