aboutsummaryrefslogtreecommitdiffstats
path: root/HTMLtree.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2001-10-23 13:10:19 +0000
committerDaniel Veillard <veillard@src.gnome.org>2001-10-23 13:10:19 +0000
commit5151c06f30d840c373d7afaaeb654e77b37da8cc (patch)
treefafd2b348911eb68a6fc526c86028c20d138c6b8 /HTMLtree.c
parentb6b0fd8962e95bdb27e9e65bc785ce8cf1a3622c (diff)
downloadandroid_external_libxml2-5151c06f30d840c373d7afaaeb654e77b37da8cc.tar.gz
android_external_libxml2-5151c06f30d840c373d7afaaeb654e77b37da8cc.tar.bz2
android_external_libxml2-5151c06f30d840c373d7afaaeb654e77b37da8cc.zip
fixed an erroneous validation bug when PE refs occurs in external parsed
* parser.c: fixed an erroneous validation bug when PE refs occurs in external parsed entities referenced from the internals subset * test/valid/index.xml test/valid/dtds/nitf-2-5.dtd test/valid/dtds/NewsMLv1.0.dtd result/valid/index.xml*: added the associated testcase, it's a nice one. * HTMLparser.c: generate the DTD node as HTML still ... * HTMLtree.c: fixed errors in Set/GetMetaEncoding Daniel
Diffstat (limited to 'HTMLtree.c')
-rw-r--r--HTMLtree.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/HTMLtree.c b/HTMLtree.c
index 7041dbe2..cd9417c6 100644
--- a/HTMLtree.c
+++ b/HTMLtree.c
@@ -54,7 +54,7 @@ htmlGetMetaEncoding(htmlDocPtr doc) {
* Search the html
*/
while (cur != NULL) {
- if (cur->name != NULL) {
+ if ((cur->type == XML_ELEMENT_NODE) && (cur->name != NULL)) {
if (xmlStrEqual(cur->name, BAD_CAST"html"))
break;
if (xmlStrEqual(cur->name, BAD_CAST"head"))
@@ -72,7 +72,7 @@ htmlGetMetaEncoding(htmlDocPtr doc) {
* Search the head
*/
while (cur != NULL) {
- if (cur->name != NULL) {
+ if ((cur->type == XML_ELEMENT_NODE) && (cur->name != NULL)) {
if (xmlStrEqual(cur->name, BAD_CAST"head"))
break;
if (xmlStrEqual(cur->name, BAD_CAST"meta"))
@@ -90,7 +90,7 @@ found_head:
*/
found_meta:
while (cur != NULL) {
- if (cur->name != NULL) {
+ if ((cur->type == XML_ELEMENT_NODE) && (cur->name != NULL)) {
if (xmlStrEqual(cur->name, BAD_CAST"meta")) {
xmlAttrPtr attr = cur->properties;
int http;
@@ -180,7 +180,7 @@ htmlSetMetaEncoding(htmlDocPtr doc, const xmlChar *encoding) {
* Search the html
*/
while (cur != NULL) {
- if (cur->name != NULL) {
+ if ((cur->type == XML_ELEMENT_NODE) && (cur->name != NULL)) {
if (xmlStrcasecmp(cur->name, BAD_CAST"html") == 0)
break;
if (xmlStrcasecmp(cur->name, BAD_CAST"head") == 0)
@@ -198,7 +198,7 @@ htmlSetMetaEncoding(htmlDocPtr doc, const xmlChar *encoding) {
* Search the head
*/
while (cur != NULL) {
- if (cur->name != NULL) {
+ if ((cur->type == XML_ELEMENT_NODE) && (cur->name != NULL)) {
if (xmlStrcasecmp(cur->name, BAD_CAST"head") == 0)
break;
if (xmlStrcasecmp(cur->name, BAD_CAST"meta") == 0)
@@ -237,7 +237,7 @@ found_meta:
* encoding informations
*/
while (cur != NULL) {
- if (cur->name != NULL) {
+ if ((cur->type == XML_ELEMENT_NODE) && (cur->name != NULL)) {
if (xmlStrcasecmp(cur->name, BAD_CAST"meta") == 0) {
xmlAttrPtr attr = cur->properties;
int http;