- check_plain() missed its train.

4.7.x
Dries Buytaert 2005-11-29 20:37:19 +00:00
parent 2d0df351d7
commit f4799d1ce9
1 changed files with 7 additions and 1 deletions

View File

@ -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.
*
*/
function check_url($uri) {
$uri = htmlspecialchars($uri, ENT_QUOTES);