You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Rong Nguyen (JIRA)" <ji...@apache.org> on 2014/01/11 04:47:51 UTC

[jira] [Resolved] (OFBIZ-5472) Freemarker decode UTF-8 in script and style tag

     [ https://issues.apache.org/jira/browse/OFBIZ-5472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rong Nguyen resolved OFBIZ-5472.
--------------------------------

    Resolution: Invalid

Use ${StringUtil.wrapString()} to solve!

> Freemarker decode UTF-8 in script and style tag
> -----------------------------------------------
>
>                 Key: OFBIZ-5472
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5472
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: Linux
>            Reporter: Rong Nguyen
>
> When label is English, everything work fine, but when i change to Vietnamese or France(if text contain unicode characters), freemarker will decode unicode characters to code that cause error to jquery.
> - For example, i have a label which used in:
> <div>
>   ${uiLabelMap.testlbl}
> </div>
> <script type="text/javascript">
>     ${uiLabelMap.testlbl}
> </script>
> (the same when i <style> tag)
> + When languge is Vietnamese, and testlbl = Giá trị
>   in client, it was decoded to: 
> <div>
>    Giá trị
> </div>
> <script type="text/javascript">
>     Gi&aacute ; tr&#7883 ;
> </script>
> As you see, when label inside one html tag(not script and style), it will be ok, but it decode utf-8 character when html tag is style or script.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)