Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

GTNPORTAL-2770 Update missing cases of non-characters removal

  • Loading branch information...
commit aba2cabc57446c861c77d5cee9b9bf084f4e235f 1 parent c1981a8
@trongtt trongtt authored
View
2  ...nent/web/resources/src/main/java/org/exoplatform/web/application/javascript/JavascriptConfigService.java
@@ -403,7 +403,7 @@ public int read(char[] cbuf, int off, int len) throws IOException {
i++;
} else if (c == '\n') {
singleComment = false;
- } else if (Character.isLetterOrDigit(c)) {
+ } else if (!Character.isWhitespace(c) && !Character.isSpaceChar(c) && !Character.isISOControl(c)) {
skip = false;
}
View
2  component/web/resources/src/test/java/org/exoplatform/portal/resource/TestJavascriptConfigService.java
@@ -74,7 +74,7 @@ protected void setUp() throws Exception {
resources.put("/js/common.js", "kkk;");
resources.put("/js/pluginTest.js", "iii;");
//trim all space character: tab, space, non-breaking space...
- resources.put("/js/normalize_test.js", " \n \t \u2007 \u00A0 \u202F \u2029 /* // */ // /* \n /* /* */ \n ggg; // /* */ \n");
+ resources.put("/js/normalize_test.js", " \n \t /* // */ // /* \n /* /* */ \n ggg; // /* */ \n");
mockServletContext = new MockJSServletContext("mockwebapp", resources);
jsService.registerContext(new WebAppImpl(mockServletContext, Thread.currentThread().getContextClassLoader()));
Please sign in to comment.
Something went wrong with that request. Please try again.