diff options
author | Tomas V.V.Cox <cox@php.net> | 2001-12-17 21:10:11 +0000 |
---|---|---|
committer | Tomas V.V.Cox <cox@php.net> | 2001-12-17 21:10:11 +0000 |
commit | 2816eafc0686d93a7ca930cb33c17cbe16131f03 (patch) | |
tree | 210ab86f38ad9ab70a5ee22e75c9444bd05d064e | |
parent | ed2bff2a7f18b813c06605a81c7a906588d06751 (diff) | |
download | php-git-2816eafc0686d93a7ca930cb33c17cbe16131f03.tar.gz |
ensure correct package names and versions in the xml parser
-rw-r--r-- | pear/PEAR/Common.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pear/PEAR/Common.php b/pear/PEAR/Common.php index 1b1a9261c7..a717acd607 100644 --- a/pear/PEAR/Common.php +++ b/pear/PEAR/Common.php @@ -262,7 +262,7 @@ class PEAR_Common extends PEAR case 'name': switch ($this->prev_element) { case 'package': - $this->pkginfo['package'] = $data; + $this->pkginfo['package'] = ereg_replace('[^a-zA-Z0-9._]', '_', trim($data)); break; case 'maintainer': $this->current_maintainer['name'] = $data; @@ -286,6 +286,7 @@ class PEAR_Common extends PEAR } break; case 'version': + $data = ereg_replace ('[^a-zA-Z0-9._\-]', '_', trim($data)); if ($this->in_changelog) { $this->current_release['version'] = $data; } else { |