mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-14 16:40:30 +00:00
handle nbsp entity
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@758 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
b9fda5fd27
commit
6cf1f652c3
1 changed files with 3 additions and 1 deletions
|
@ -247,7 +247,7 @@ public final class ParserUtils
|
|||
}
|
||||
}
|
||||
|
||||
private static final Pattern P_ENTITY = Pattern.compile("&(?:#(x[\\da-f]+|\\d+)|(amp|quot|apos|szlig));");
|
||||
private static final Pattern P_ENTITY = Pattern.compile("&(?:#(x[\\da-f]+|\\d+)|(amp|quot|apos|szlig|nbsp));");
|
||||
|
||||
public static String resolveEntities(final CharSequence str)
|
||||
{
|
||||
|
@ -279,6 +279,8 @@ public final class ParserUtils
|
|||
c = '\'';
|
||||
else if (namedEntity.equals("szlig"))
|
||||
c = 'ß';
|
||||
else if (namedEntity.equals("nbsp"))
|
||||
c = ' ';
|
||||
else
|
||||
throw new IllegalStateException("unknown entity: " + namedEntity);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue