*/
int
htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur) {
+ xmlInitParser();
+
return(htmlNodeDumpFormat(buf, doc, cur, 1));
}
xmlCharEncodingHandlerPtr handler = NULL;
int ret;
+ xmlInitParser();
+
if (encoding != NULL) {
xmlCharEncoding enc;
xmlCharEncodingHandlerPtr handler = NULL;
const char *encoding;
+ xmlInitParser();
+
if (cur == NULL) {
#ifdef DEBUG_TREE
xmlGenericError(xmlGenericErrorContext,
value = xmlNodeListGetString(doc, cur->children, 0);
if (value) {
xmlOutputBufferWriteString(buf, "=");
- if ((!xmlStrcasecmp(cur->name, BAD_CAST "href")) ||
- (!xmlStrcasecmp(cur->name, BAD_CAST "src"))) {
+ if ((cur->ns == NULL) && (cur->parent != NULL) &&
+ (cur->parent->ns == NULL) &&
+ ((!xmlStrcasecmp(cur->name, BAD_CAST "href")) ||
+ (!xmlStrcasecmp(cur->name, BAD_CAST "action")) ||
+ (!xmlStrcasecmp(cur->name, BAD_CAST "src")))) {
xmlChar *escaped;
xmlChar *tmp = value;
while (IS_BLANK(*tmp)) tmp++;
- escaped = xmlURIEscapeStr(tmp, BAD_CAST"@/:=?;#%&");
+ escaped = xmlURIEscapeStr(tmp, BAD_CAST"@/:=?;#%&,+");
if (escaped != NULL) {
xmlBufferWriteQuotedString(buf->buffer, escaped);
xmlFree(escaped);
xmlNodePtr cur, const char *encoding, int format) {
const htmlElemDesc * info;
+ xmlInitParser();
+
if (cur == NULL) {
xmlGenericError(xmlGenericErrorContext,
"htmlNodeDumpFormatOutput : node == NULL\n");
xmlOutputBufferWriteString(buf, ">");
} else {
xmlOutputBufferWriteString(buf, "></");
+ if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
+ xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
+ xmlOutputBufferWriteString(buf, ":");
+ }
xmlOutputBufferWriteString(buf, (const char *)cur->name);
xmlOutputBufferWriteString(buf, ">");
}
const char *encoding, int format) {
int type;
+ xmlInitParser();
+
/*
* force to output the stuff as HTML, especially for entities
*/
const char *encoding;
int ret;
+ xmlInitParser();
+
if (cur == NULL) {
#ifdef DEBUG_TREE
xmlGenericError(xmlGenericErrorContext,
const char *encoding;
int ret;
+ xmlInitParser();
+
encoding = (const char *) htmlGetMetaEncoding(cur);
if (encoding != NULL) {
xmlCharEncodingHandlerPtr handler = NULL;
int ret;
+ xmlInitParser();
+
if (encoding != NULL) {
xmlCharEncoding enc;