Skip to content

Commit

Permalink
issue #45
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouji2013 committed Jul 19, 2019
1 parent f8330cc commit 996e62d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/src/main/webapp/js/template.helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -968,8 +968,8 @@ const __TemplateHelperView = (function ($) {
return description_name + " (" + descriptions[i].length + " characters) is longer than allowed 10240 characters";
}
if (!normalCharacaters.test(descriptions[i])) {
const non_regular = /[^ -~\t\n\r]/.exec(descriptions[i]);
return description_name + " contains characters beyond 7-bit ASCII: " + non_regular[0];
const non_regular = /([ -~\t\n\r]{0,5})([^ -~\t\n\r])(.{0,5})/.exec(descriptions[i]);
return description_name + " contains characters beyond 7-bit ASCII: " + non_regular[1] + "<font color=red>" + non_regular[2] + "</font>" + non_regular[3];
}
}
return '';
Expand Down

0 comments on commit 996e62d

Please sign in to comment.