String content = (String)atts.getAttribute(HTML.Attribute.CONTENT);
if (content != null) {
if ("content-type".equalsIgnoreCase((String)atts.getAttribute(HTML.Attribute.HTTPEQUIV))) {
if (!content.equalsIgnoreCase("text/html") &&
!content.equalsIgnoreCase("text/plain")) {
throw new ChangedCharSetException(content, false);
}
} else if ("charset" .equalsIgnoreCase((String)atts.getAttribute(HTML.Attribute.HTTPEQUIV))) {
throw new ChangedCharSetException(content, true);
}
}
}
}
if (inbody != 0 || elem == dtd.meta || elem == dtd.base || elem == dtd.isindex || elem == dtd.style || elem == dtd.link) {