1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-15 11:04:18 +02:00

Parser cleanup

This commit is contained in:
Cameron
2017-09-19 16:19:39 -07:00
parent 80d69c4293
commit 02e80f50de
8 changed files with 170 additions and 129 deletions

View File

@@ -2374,7 +2374,12 @@ class e_parse extends e_parser
function toText($text)
{
if($this->isHtml($text)==true)
if($this->isBbcode($text) === true) // convert any bbcodes to html
{
$text = $this->toHtml($text,true);
}
if($this->isHtml($text) === true) // strip any html.
{
$text = $this->toHtml($text,true);
$text = strip_tags($text);
@@ -4103,7 +4108,7 @@ class e_parser
return false;
}
$bbsearch = array('[/h]', '[/b]', '[/link]', '[/right]', '[/center]', '[/flash]', '[/code]', '[/table]');
$bbsearch = array('[/img]','[/h]', '[/b]', '[/link]', '[/right]', '[/center]', '[/flash]', '[/code]', '[/table]');
foreach($bbsearch as $v)
{