mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-13 09:01:53 +03:00
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
This commit is contained in:
12
HTMLtree.c
12
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;
|
||||
|
Reference in New Issue
Block a user