Re: htmlspecialchars() alias
| From: | brad lafountain | Date: | Thu, 17 Jan 2002 19:50:29 +0000 |
| Subject: | Re: htmlspecialchars() alias | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-77364@lists.php.net to get a copy of this message | ||
hmm...
if you don't feel like typing it out..
$hsc = "htmlspecialchars";
echo $hsc($var);
- Brad
--- "Jason G." <blair@nb.net> wrote:
> Hello General and Dev list,
>
> Considering the fact that it is good practice to use htmlspecialchars()
> anytime you are outputting non-html content to the browser...
>
> After typing the 16 characters in the htmlspecialchars() function thousands
> of times...
>
> I was wondering if it would be feasible to create an alias for this
> function, say hsc() or something short.
>
> Even nicer, but probably not practical would be a language extension like:
> <?== $var ?> being the same as <?= htmlspecialchars($var) ?>
>
> It is no big deal, but for a function that is used ALL THE TIME, it would
> be nice.
>
> Any Comments???
>
> -Jason Garber
> www.IonZoft.com
> www.Univo.biz
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/