Skip to content

Commit

Permalink
fixed files form Lang #42
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Mar 7, 2017
1 parent 4759775 commit 60e3cbd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions projects/Lang/42/org/apache/commons/lang/Entities.java
Original file line number Diff line number Diff line change
Expand Up @@ -825,10 +825,15 @@ public String escape(String str) {
public void escape(Writer writer, String str) throws IOException {
int len = str.length();
for (int i = 0; i < len; i++) {
char c = str.charAt(i);
int c = Character.codePointAt(str, i);
String entityName = this.entityName(c);
if (entityName == null) {
if (c > 0x7F) {
if (c >= 0x010000 && i < len - 1) {
writer.write("&#");
writer.write(Integer.toString(c, 10));
writer.write(';');
i++;
} else if (c > 0x7F) {
writer.write("&#");
writer.write(Integer.toString(c, 10));
writer.write(';');
Expand Down

0 comments on commit 60e3cbd

Please sign in to comment.