Req #62574 [Com]: New operator for htmlspecialchars

From: Date: Tue, 04 Sep 2012 18:06:32 +0000
Subject: Req #62574 [Com]: New operator for htmlspecialchars
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-173173@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=62574&edit=1

 ID:                 62574
 Comment by:         ajf at ajf dot me
 Reported by:        thbley at gmail dot com
 Summary:            New operator for htmlspecialchars
 Status:             Open
 Type:               Feature/Change Request
 Package:            *General Issues
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

You can escape things ahead-of-time, you know. In fact, I have a feeling you 
could use foreach to traverse the symtable and escape everything. (don't do that 
though, that's a horrendous idea)


Previous Comments:
------------------------------------------------------------------------
[2012-07-16 04:07:43] thbley at gmail dot com

Description:
------------
old:
<?php
echo htmlspecialchars($str, ENT_QUOTES);
<?= htmlspecialchars($str, ENT_QUOTES) ?>

new:
echo <$str>;
<?= <$str> ?>

or:
<?+ $str ?>



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62574&edit=1


Thread (10 messages)

« previous php.bugs (#173173) next »