mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
BUGFIX Fixed regular expression to trim off last "</ul>" tag in LeftAndMain->getsubtree(), switched from deprecated ereg_replace() to preg_replace
This commit is contained in:
parent
57e1c41f15
commit
f53fe8193f
@ -578,8 +578,8 @@ class LeftAndMain extends Controller {
|
||||
);
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user