diff options
-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 { |