From: Adam Dickmeiss Date: Mon, 11 Jun 2007 12:02:48 +0000 (+0000) Subject: Fixed bug #1185: metadata includes entities. This minor change makes X-Git-Tag: PAZPAR2.1.0.0~61 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=25d229ded902917f8b5408c0640a0d6436187e87;p=pazpar2-moved-to-github.git Fixed bug #1185: metadata includes entities. This minor change makes the internal data raw and without entities. It missing xmlputs for records explained why this worked before. However, the termlist output was bad, because xmlputs were used and so it was _double_ & escaped. This could explain why entities were seen by some on the facet output. --- diff --git a/src/http_command.c b/src/http_command.c index 52ccacd..2676fcb 100644 --- a/src/http_command.c +++ b/src/http_command.c @@ -1,4 +1,4 @@ -/* $Id: http_command.c,v 1.48 2007-06-06 09:00:56 marc Exp $ +/* $Id: http_command.c,v 1.49 2007-06-11 12:02:48 adam Exp $ Copyright (c) 2006-2007, Index Data. This file is part of Pazpar2. @@ -20,7 +20,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA */ /* - * $Id: http_command.c,v 1.48 2007-06-06 09:00:56 marc Exp $ + * $Id: http_command.c,v 1.49 2007-06-11 12:02:48 adam Exp $ */ #include @@ -425,7 +425,7 @@ static void write_metadata(WRBUF w, struct conf_service *service, switch (cmd->type) { case Metadata_type_generic: - wrbuf_puts(w, md->data.text); + wrbuf_xmlputs(w, md->data.text); break; case Metadata_type_year: wrbuf_printf(w, "%d", md->data.number.min); diff --git a/src/logic.c b/src/logic.c index 1ceffce..4b6baf5 100644 --- a/src/logic.c +++ b/src/logic.c @@ -1,4 +1,4 @@ -/* $Id: logic.c,v 1.38 2007-06-07 12:27:03 adam Exp $ +/* $Id: logic.c,v 1.39 2007-06-11 12:02:48 adam Exp $ Copyright (c) 2006-2007, Index Data. This file is part of Pazpar2. @@ -938,7 +938,7 @@ struct record *ingest_record(struct client *cl, Z_External *rec, int first, last; type = xmlGetProp(n, (xmlChar *) "type"); - value = xmlNodeListGetString(xdoc, n->children, 0); + value = xmlNodeListGetString(xdoc, n->children, 1); if (!type || !value) continue;