quick fix (added trim() around parse xml elements).

svn path=/trunk/boinc/; revision=8234
This commit is contained in:
Matt Lebofsky 2005-09-27 21:40:50 +00:00
parent 53a262ebde
commit 84cce04828
1 changed files with 3 additions and 3 deletions

View File

@ -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 <tag/> or <tag>1</tag>