[/CODE] tag makes the code-block end? I don't see any unexpected behavior here. /**
* Handles inline code and code tags.
*
* @param string $text
* @param Tag $tag
*
* @return mixed
*/
public function handleTagCode($text, Tag $tag)
{
if (\preg_match('#\r\n|\r|\n#', $text))
{
return '[CODE]' . $text . '[' . '/CODE]';
}
return '[ICODE]' . $text . '[/ICODE]';
}
</script> tag within it.[code] open within the content then means that the tag doesn't get closed when expected (as the close tag would be matched with the inner tag).We use essential cookies to make this site work, and optional cookies to enhance your experience.