Package: phpsysinfo Version: 3.0~rc3-1 Severity: normal Tags: patch phpsysinfo returns an error when an usb-device has an "&" in its name. The Error is: Warning: SimpleXMLElement::addChild() [function.SimpleXMLElement-addChild]: unterminated entity reference Save USB 2.0 Packard Bell Store&Save USB 2.0 in /usr/share/phpsysinfo/includes/xml.class.php on line 117
A patch to fix this Probleme is attached. -- System Information: Debian Release: lenny/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 2.6.24-1-amd64 (SMP w/2 CPU cores) Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) Shell: /bin/sh linked to /bin/bash Versions of packages phpsysinfo depends on: ii apache2-mpm-prefork [httpd] 2.2.8-1 Traditional model for Apache HTTPD ii php5 5.2.5-3 server-side, HTML-embedded scripti phpsysinfo recommends no packages. -- no debconf information
--- /usr/share/phpsysinfo/includes/xml.class.php~ 2008-03-29 16:30:35.000000000 +0100 +++ /usr/share/phpsysinfo/includes/xml.class.php 2008-03-29 16:23:01.000000000 +0100 @@ -114,7 +114,7 @@ class xml { for ($i = 0, $max = sizeof($arrBuf);$i < $max;$i++) { if (trim($arrBuf[$i]) != "") { $tmp = $usb->addChild('Device'); - $tmp->addChild('Name', utf8_encode(trim($arrBuf[$i]))); + $tmp->addChild('Name', utf8_encode(trim(str_replace('&', '&', $arrBuf[$i])))); } } }