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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

Nicolas Malin (Jira)

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

Rong Nguyen updated OFBIZ-5472:
-------------------------------

    Description:
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.


  was:
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>




> 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)