MediaWiki
REL1_32
HtmlArmor.php
Go to the documentation of this file.
1
<?php
28
class
HtmlArmor
{
29
33
private
$value
;
34
38
public
function
__construct
(
$value
) {
39
$this->value =
$value
;
40
}
41
50
public
static
function
getHtml
(
$input
) {
51
if
(
$input
instanceof
HtmlArmor
) {
52
return
$input
->value;
53
}
else
{
54
return
htmlspecialchars(
$input
, ENT_QUOTES );
55
}
56
}
57
}
HtmlArmor
Marks HTML that shouldn't be escaped.
Definition
HtmlArmor.php:28
HtmlArmor\$value
string null $value
Definition
HtmlArmor.php:33
HtmlArmor\getHtml
static getHtml( $input)
Provide a string or HtmlArmor object and get safe HTML back.
Definition
HtmlArmor.php:50
HtmlArmor\__construct
__construct( $value)
Definition
HtmlArmor.php:38
$input
if(is_array($mode)) switch( $mode) $input
Definition
postprocess-phan.php:141
$value
$value
Definition
styleTest.css.php:49
includes
libs
HtmlArmor.php
Generated on Mon Nov 25 2024 15:57:14 for MediaWiki by
1.10.0