parse ambiguous type in brackets

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@566 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach@gmail.com 2011-04-16 09:26:50 +00:00
parent eeee8303a2
commit ab24e4284b
2 changed files with 26 additions and 10 deletions

View file

@ -220,7 +220,7 @@ public final class ParserUtils
}
}
private static final Pattern P_ENTITY = Pattern.compile("&(?:#(x[\\da-f]+|\\d+)|(amp|quot|apos));");
private static final Pattern P_ENTITY = Pattern.compile("&(?:#(x[\\da-f]+|\\d+)|(amp|quot|apos|szlig));");
public static String resolveEntities(final CharSequence str)
{
@ -250,6 +250,8 @@ public final class ParserUtils
c = '"';
else if (namedEntity.equals("apos"))
c = '\'';
else if (namedEntity.equals("szlig"))
c = 'ß';
else
throw new IllegalStateException("unknown entity: " + namedEntity);
}