MediaWiki
master
HtmlArmor.php
Go to the documentation of this file.
1
<?php
30
class
HtmlArmor
{
31
35
private
$value;
36
43
public
function
__construct
( $value ) {
44
$this->value = $value;
45
}
46
55
public
static
function
getHtml
( $input ) {
56
if
( $input instanceof
HtmlArmor
) {
57
return
$input->value;
58
}
else
{
59
return
htmlspecialchars( $input, ENT_QUOTES );
60
}
61
}
62
}
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:55
HtmlArmor\__construct
__construct( $value)
Definition
HtmlArmor.php:43
includes
libs
HtmlArmor.php
Generated on Sat Nov 2 2024 19:24:18 for MediaWiki by
1.10.0