fp024 commented on PR #297:
URL: https://github.com/apache/struts-examples/pull/297#issuecomment-1856060640

   ## 1. Fix freemarker template error in `themes` example
   
   **ERROR MESSAGE**
   
   
![image](https://github.com/apache/struts-examples/assets/42864970/8b5bfddf-2388-410f-b24e-2bcfc1e2131d)
   
   
   ```
   FreeMarker template error (HTML_DEBUG mode; use RETHROW in production!)
   
   Template inclusion failed (for parameter value 
"/template/KUTheme_simple/checkboxlist.ftl"):
   Syntax error in template "template/KUTheme_simple/checkboxlist.ftl" in line 
16, column 48:
   Using ?html (legacy escaping) is not allowed when auto-escaping is on with a 
markup output format (HTML), to avoid double-escaping mistakes.
   
   ----
   FTL stack trace ("~" means nesting-related):
        - Failed at: #include "/${parameters.templateDir}/...  [in template 
"template/KUTheme/checkboxlist.ftl" at line 2, column 1]
   ----
   ```
   
   This error occurs because `?html` is used.
   
   `?esc` is the latest escaping method that applies appropriate escaping 
depending on the output format of the template. For example, if the output 
format is HTML, `?esc` applies the same escaping as `?html`. However, if the 
output format is XML or JSON, `?esc` applies escaping suitable for that format.
   
   This doesn't happen with Struts 2.5.33, but it does happen with 6.3.0.2. I 
think it's because the freemarker dependency has been upgraded.
   
   * 
https://freemarker.apache.org/docs/dgui_misc_autoescaping.html#dgui_misc_autoescaping_overrideoformat
   * https://freemarker.apache.org/docs/ref_directive_escape.html
   
   💡 Changed `?html` to `?esc`.
   
   
   
   ## 2. Fix typo in class name in `jasperreports` example
   
   There was a typo in the class name.
   
   💡 `JapserInitializer` -> `JasperInitializer`
   
   
   
   thank you Have a nice day 👍


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@struts.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to