(contents.charAt(tmpIndex) == ';')) {
int entityNumber = Integer.parseInt(contents.substring(startIndex, tmpIndex), radix);
HtmlCharacters htmlCharacter = HtmlCharacters.getCharacterByEntityNumber(entityNumber);
boolean shouldReplace = true;
if (htmlCharacter != null) {
shouldReplace = htmlCharacter.shouldReplaceNumeric();
if (HtmlCharacters.SYMBOL_VERTICAL_BAR.equals(htmlCharacter) &&
(analysis.isInTemplate(ampersandIndex) != null)) {
shouldReplace = false;
}
}