Fixes https://www.woltlab.com/bugtracker/index.php?page=Bug&bugID=428
(?:\s*[a-z]+\s*=\s*(?:
"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"|\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\'|[^\s>]
))*\s*/?>~ix';
+ const HTML_COMMENT_PATTERN = '~<!--(.*?)-->~';
/**
* Returns a salted hash of the given value.
* @return string
*/
public static function stripHTML($string) {
- return preg_replace(self::HTML_PATTERN, '', $string);
+ return preg_replace(self::HTML_PATTERN, '', preg_replace(self::HTML_COMMENT_PATTERN, '', $string));
}
/**