387
twItter AutHentICAtIon And ssl Curl
if($urlQuerySAFE)
$urlSAFE. = "?". $urlQuerySAFE;
ese last two steps prepare the URL for displaying in an HTML context, and as
a hyperlink. First, the whole URL is run through htmlentities().
$htmlSAFE = htmlentities($fullURL[0], ENT_QUOTES, "UTF-8", false);
Second, the link is prepared by inserting the appropriate tags.
$link = preg_replace($regExUrl,
"<a href = '{$urlSAFE}'>{$htmlSAFE}</a> ",
$word);
$sanitizedHTML. = $link;
}
When a text word is not a URL link, the text is sanitized as straight HTML text,
being careful not to double encode already encoded entities.
else
{
$sa nitizedHTML. = htmlentities($word, ENT_QUOTES, "UTF-8", false);
}
$sanitizedHTML. = " ";
After filtering, the newly sanitized and ...