Fixes to html_fixtags

This commit is contained in:
Daniil Gentili 2017-06-30 16:10:40 +02:00
parent 70a85cb6be
commit 99fb6f15b5

View File

@ -514,7 +514,7 @@ trait BotAPI
public function html_fixtags($text) public function html_fixtags($text)
{ {
preg_match_all("#(.*?)(<(a|b|strong|em|i|code|pre)[^>]*>)(.*?)(<\/\\3>)(.*)?#is", $text, $matches, PREG_SET_ORDER); preg_match_all("#(.*?)(<(a|b|strong|em|i|code|pre)[^>]*>)([^<]*?)(<\/\\3>)(.*)?#is", $text, $matches, PREG_SET_ORDER);
if ($matches) { if ($matches) {
$last = count($matches) - 1; $last = count($matches) - 1;
foreach ($matches as $val) { foreach ($matches as $val) {