MediaWiki
REL1_39
HtmlArmor.php
Go to the documentation of this file.
1
<?php
30
class
HtmlArmor
{
31
35
private
$value;
36
42
public
function
__construct
( $value ) {
43
$this->value = $value;
44
}
45
54
public
static
function
getHtml
( $input ) {
55
if
( $input instanceof
HtmlArmor
) {
56
return
$input->value;
57
}
else
{
58
return
htmlspecialchars( $input, ENT_QUOTES );
59
}
60
}
61
}
HtmlArmor
Marks HTML that shouldn't be escaped.
Definition
HtmlArmor.php:30
HtmlArmor\getHtml
static getHtml( $input)
Provide a string or HtmlArmor object and get safe HTML back.
Definition
HtmlArmor.php:54
HtmlArmor\__construct
__construct( $value)
Definition
HtmlArmor.php:42
includes
libs
HtmlArmor.php
Generated on Sun Nov 24 2024 11:23:18 for MediaWiki by
1.10.0