Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.2.1

Bug #9561 Not allowing underscores in middle of tags
Submitted: 2006-12-06 10:44 UTC Modified: 2006-12-16 04:46 UTC
From: darren at cwebd dot co dot uk Assigned: schst
Status: Closed Package: XML_Util (version 1.1.2)
PHP Version: 5.2.0 RC4 OS: Linux 2.6.10 - Debian Sarge
Roadmaps: (Not assigned)    
Subscription  


 [2006-12-06 10:44 UTC] darren at cwebd dot co dot uk (Darren Clark)
Description: ------------ When a tag name such as "TEST_UNDERSCORE" is passed to XML_Util::isValidName the test fails due to a regex error. Test script: --------------- $result = XML_Util::isValidName("TEST_UNDERSCORE"); if (PEAR::isError($result)) { print "Invalid XML name: " . $result->getMessage(); } FIX: Line:753 change to: if (!preg_match('/^([[:alpha:]_]([[:alnum:]\-\.]*)?:)?[[:alpha:]_]([[:alnum:]\_\-\.]+)?$/', $string)) { Expected result: ---------------- isValidName should return true Actual result: -------------- isValidName should return's false

Comments

 [2006-12-16 04:46 UTC] schst (Stephan Schmidt)
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/XML_Util