Permalink
Browse files

BUGFIX Fixed regular expression to trim off last "</ul>" tag in LeftA…

…ndMain->getsubtree(), switched from deprecated ereg_replace() to preg_replace
  • Loading branch information...
1 parent 57e1c41 commit f53fe8193f016cc937ed8c27df3bd1c24db449f6 @chillu chillu committed Mar 1, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 code/LeftAndMain.php
View
@@ -578,8 +578,8 @@ public function getsubtree($request) {
);
// Trim off the outer tag
- $html = ereg_replace('^[ \t\r\n]*<ul[^>]*>','', $html);
- $html = ereg_replace('</ul[^>]*>[ \t\r\n]*$','', $html);
+ $html = preg_replace('/^[\s\t\r\n]*<ul[^>]*>/','', $html);
+ $html = preg_replace('/<\/ul[^>]*>[\s\t\r\n]*$/','', $html);
return $html;
}

0 comments on commit f53fe81

Please sign in to comment.