From 84cce048282488ec57f0d74c53729296e473f581 Mon Sep 17 00:00:00 2001 From: Matt Lebofsky Date: Tue, 27 Sep 2005 21:40:50 +0000 Subject: [PATCH] quick fix (added trim() around parse xml elements). svn path=/trunk/boinc/; revision=8234 --- html/inc/util.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/html/inc/util.inc b/html/inc/util.inc index d9abcfc83d..ca5d881fba 100644 --- a/html/inc/util.inc +++ b/html/inc/util.inc @@ -316,7 +316,7 @@ function parse_element($xml, $tag) { $element = substr($y, 0, $n); } } - return $element; + return trim($element); } function parse_next_element($xml, $tag, $cursor) { @@ -333,7 +333,7 @@ function parse_next_element($xml, $tag, $cursor) { } $cursor = (strlen($xml) - strlen($x)) + strlen($tag) + strlen($closetag) + strlen($element); } - return $element; + return trim($element); } if (!function_exists("file_get_contents")) { @@ -361,7 +361,7 @@ function get_config() { // function parse_config($config, $tag) { $element = parse_element($config, $tag); - return trim($element); + return $element; } // return true if XML contains either or 1