- Модуль: main
- Путь к файлу: ~/bitrix/modules/main/classes/general/convertorspregreplacehelper.php
- Класс: CConvertorsPregReplaceHelper
- Вызов: CConvertorsPregReplaceHelper::convertCodeTagForHtmlBefore
public function convertCodeTagForHtmlBefore($text = "")
{
if (is_array($text))
$text = $text[2];
if ($text == '')
return '';
$text = str_replace(chr(2), "", $text);
$text = str_replace("n", chr(4), $text);
$text = str_replace("r", chr(5), $text);
$text = str_replace(" ", chr(6), $text);
$text = str_replace("t", chr(7), $text);
$text = str_replace("http", "!http!", $text);
$text = str_replace("https", "!https!", $text);
$text = str_replace("ftp", "!ftp!", $text);
$text = str_replace("@", "!@!", $text);
$text = str_replace(Array("[","]"), array(chr(16), chr(17)), $text);
$return = "[code]".$text."[/code]";
return $return;
}