Re: htmlspecialchars() alias
| From: | Martin Wickman | Date: | Fri, 18 Jan 2002 15:50:16 +0000 |
| Subject: | Re: htmlspecialchars() alias | ||
| References: | 1 | Groups: | php.dev php.general |
| Request: | Send a blank email to php-dev+get-77440@lists.php.net to get a copy of this message | ||
Jason G. 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) ?>Yup, sounds like a good idea. But I guess you could always wrap htmlspecialchars in your own function until php gets that feature.