Permalink
Browse files

Bug #17764 Patch: Using PCRE instead of ereg/eregi

git-svn-id: http://svn.php.net/repository/pear/packages/XML_Beautifier/trunk@302598 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent dbd42c9 commit b630e5a0b8d69ce3cad072c9bdead8e5de69a023 @CloCkWeRX CloCkWeRX committed Aug 21, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 Beautifier/Tokenizer.php
View
6 Beautifier/Tokenizer.php
@@ -283,7 +283,7 @@ function defaultHandler($parser, $data)
*/
function _handleDoctype($data)
{
- if (eregi(">", $data)) {
+ if (preg_match("/>/i", $data)) {
$last = $this->_getLastToken();
if ($last["data"] == "]" ) {
$this->_mode = "xml";
@@ -314,7 +314,7 @@ function _handleXMLDefault($data)
* handle comment
*/
$regs = array();
- eregi("<!--(.+)-->", $data, $regs);
+ preg_match("/<!--(.+)-->/i", $data, $regs);
$comment = trim($regs[1]);
$struct = array(
@@ -372,7 +372,7 @@ function _handleXMLDefault($data)
"depth" => $this->_depth
);
- } elseif (eregi("^<!DOCTYPE", $data)) {
+ } elseif (preg_match("/^<!DOCTYPE/i", $data)) {
$this->_mode = "doctype";
$struct = array(
"type" => XML_BEAUTIFIER_DT_DECLARATION,

0 comments on commit b630e5a

Please sign in to comment.