1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
htmlconverter.php
См. документацию.
1
<?php
2
namespace
Bitrix\Main\Text;
3
4
class
HtmlConverter
extends
Converter
5
{
6
public
function
encode
(
$text
, $textType =
''
)
7
{
8
if
(is_object(
$text
))
9
{
10
return
$text
;
11
}
12
13
$textType =
Converter::initTextType
($textType);
14
if
($textType ===
Converter::HTML
)
15
{
16
return
$text
;
17
}
18
19
if
(
$text
===
null
)
20
{
21
return
''
;
22
}
23
24
return
HtmlFilter::encode
(
$text
);
25
}
26
27
public
function
decode
(
$text
, $textType =
''
)
28
{
29
if
(is_object(
$text
))
30
{
31
return
$text
;
32
}
33
34
$textType =
Converter::initTextType
($textType);
35
if
($textType ===
Converter::HTML
)
36
{
37
return
$text
;
38
}
39
40
if
(
$text
===
null
)
41
{
42
return
''
;
43
}
44
45
return
htmlspecialchars_decode(
$text
);
46
}
47
}
Bitrix\Main\Text\Converter
Определения
converter.php:5
Bitrix\Main\Text\Converter\initTextType
static initTextType($textType)
Определения
converter.php:34
Bitrix\Main\Text\Converter\HTML
const HTML
Определения
converter.php:7
Bitrix\Main\Text\HtmlConverter
Определения
htmlconverter.php:5
Bitrix\Main\Text\HtmlConverter\decode
decode($text, $textType='')
Определения
htmlconverter.php:27
Bitrix\Main\Text\HtmlConverter\encode
encode($text, $textType='')
Определения
htmlconverter.php:6
Bitrix\Main\Text\HtmlFilter\encode
static encode($string, $flags=ENT_COMPAT, $doubleEncode=true)
Определения
htmlfilter.php:12
$text
$text
Определения
template_pdf.php:79
bitrix
modules
main
lib
text
htmlconverter.php
Создано системой
1.14.0