John Wilson created WW-5542:
-------------------------------

             Summary: Encoding issue in javascript included in JSPs
                 Key: WW-5542
                 URL: https://issues.apache.org/jira/browse/WW-5542
             Project: Struts 2
          Issue Type: Bug
    Affects Versions: 6.7.0
            Reporter: John Wilson


We seem to be facing a character encoding issues after migrating from 2.5.33 to 
6.7.0.

The encoding in the JSP is set to UTF-8, the JSP file and JS file encoding are 
also set to UTF-8.
{code:java}
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%> {code}
However when we include a js bundle in the JSP via script tag
{code:java}
<script src="resources/blah/blah/blah.js"></script> {code}
We now face encoding issues in the included bundle components of the web-app.
I have also confirmed that the bundle and it's component are encoded to UTF-8.

An example encoding issue we've seen is 
{code:java}
&nbsp; --> Â&nbsp;{code}
Important to note this was only in the included components. &nbsp; encodes 
properly if it was used in the JSP directly.

After implementing the suggestion from WW-5100 and adding 
{{.*\.js}} to struts.action.excludePattern the issue was resolved.



 

 

 

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to