diff options
Diffstat (limited to 'phpBB/phpbb/textformatter/s9e/utils.php')
| -rw-r--r-- | phpBB/phpbb/textformatter/s9e/utils.php | 17 | 
1 files changed, 3 insertions, 14 deletions
| diff --git a/phpBB/phpbb/textformatter/s9e/utils.php b/phpBB/phpbb/textformatter/s9e/utils.php index df4ae4b9ec..29dcfcdf58 100644 --- a/phpBB/phpbb/textformatter/s9e/utils.php +++ b/phpBB/phpbb/textformatter/s9e/utils.php @@ -26,7 +26,7 @@ class utils implements \phpbb\textformatter\utils_interface  		// Insert a space before <s> and <e> then remove formatting  		$text = preg_replace('#<[es]>#', ' $0', $text); -		return \s9e\TextFormatter\Unparser::removeFormatting($text); +		return \s9e\TextFormatter\Utils::removeFormatting($text);  	}  	/** @@ -34,18 +34,7 @@ class utils implements \phpbb\textformatter\utils_interface  	*/  	public function remove_bbcode($text, $bbcode_name, $depth = 0)  	{ -		$dom = new \DOMDocument; -		$dom->loadXML($text); - -		$xpath = new \DOMXPath($dom); -		$nodes = $xpath->query(str_repeat('//' . strtoupper($bbcode_name), 1 + $depth)); - -		foreach ($nodes as $node) -		{ -			$node->parentNode->removeChild($node); -		} - -		return $dom->saveXML($dom->documentElement); +		return \s9e\TextFormatter\Utils::removeTag($text, strtoupper($bbcode_name), $depth);  	}  	/** @@ -53,7 +42,7 @@ class utils implements \phpbb\textformatter\utils_interface  	*/  	public function remove_formatting($text)  	{ -		return \s9e\TextFormatter\Unparser::removeFormatting($text); +		return \s9e\TextFormatter\Utils::removeFormatting($text);  	}  	/** | 
