Permalink
Browse files

GTNPORTAL-2770 Update missing cases of non-characters removal

  • Loading branch information...
1 parent c1981a8 commit aba2cabc57446c861c77d5cee9b9bf084f4e235f @trongtt trongtt committed Mar 18, 2013
@@ -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;
}
@@ -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()));

0 comments on commit aba2cab

Please sign in to comment.