- check_plain() missed its train.
parent
2d0df351d7
commit
f4799d1ce9
|
@ -707,9 +707,15 @@ function arg($index) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encode special characters in a plain-text string for display as HTML.
|
||||||
|
*/
|
||||||
|
function check_plain($text) {
|
||||||
|
return htmlspecialchars($text, ENT_QUOTES);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prepare a URL for use in an HTML attribute. Strips harmful protocols.
|
* Prepare a URL for use in an HTML attribute. Strips harmful protocols.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
function check_url($uri) {
|
function check_url($uri) {
|
||||||
$uri = htmlspecialchars($uri, ENT_QUOTES);
|
$uri = htmlspecialchars($uri, ENT_QUOTES);
|
||||||
|
|
Loading…
Reference in New Issue