From 8cb93099d166bb4d8d1167bd589e3ada90262782 Mon Sep 17 00:00:00 2001 From: erickson Date: Thu, 25 Sep 2008 21:44:55 +0000 Subject: [PATCH 1/1] only compare the first 9 chars, in case the content type is "text/html; charset=blah", or similar. git-svn-id: svn://svn.open-ils.org/ILS/trunk@10707 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/apachemods/mod_xmlent.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/apachemods/mod_xmlent.c b/Open-ILS/src/apachemods/mod_xmlent.c index fc746905db..d1a88ad6d9 100644 --- a/Open-ILS/src/apachemods/mod_xmlent.c +++ b/Open-ILS/src/apachemods/mod_xmlent.c @@ -228,7 +228,7 @@ static void XMLCALL startElement(void *userData, const char *name, const char ** filter->r->per_dir_config, &xmlent_module ); _fwrite(filter, "<%s", name ); printAttr( filter, atts ); - if (!strcmp(config->contentType, MODXMLENT_CONFIG_CONTENT_TYPE_DEFAULT) + if (!strncmp(config->contentType, MODXMLENT_CONFIG_CONTENT_TYPE_DEFAULT, 9) && isEmptyElement(name)) { _fwrite(filter, " />", name ); } else { @@ -272,7 +272,7 @@ static void XMLCALL endElement(void *userData, const char *name) { ap_filter_t* filter = (ap_filter_t*) userData; xmlEntConfig* config = ap_get_module_config( filter->r->per_dir_config, &xmlent_module ); - if (!strcmp(config->contentType, MODXMLENT_CONFIG_CONTENT_TYPE_DEFAULT) + if (!strncmp(config->contentType, MODXMLENT_CONFIG_CONTENT_TYPE_DEFAULT, 9) && isEmptyElement(name)) { return; } -- 2.43.2