1
0
mirror of https://github.com/php/php-src.git synced 2026-04-09 00:53:30 +02:00

ensure correct package names and versions in the xml parser

This commit is contained in:
Tomas V.V.Cox
2001-12-17 21:10:11 +00:00
parent ed2bff2a7f
commit 2816eafc06

View File

@@ -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 {