Bug #16007 Updated: Want quick shortcut for <?php echo htmlspecialchars($var) ?>

From: Date: Mon, 11 Mar 2002 23:02:23 +0000
Subject: Bug #16007 Updated: Want quick shortcut for <?php echo htmlspecialchars($var) ?>
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-2261@lists.php.net to get a copy of this message
ID: 16007 Updated by: mfischer@php.net Reported By: asd@suespammers.org -Status: Open +Status: Closed Bug Type: Feature/Change Request Operating System: n/a PHP Version: 4.1.2 New Comment: Easily done, write your own function 'h($a) { return htmlspecialchars($a);}', your call could then look like '<?=h($var)?>' Previous Comments: ------------------------------------------------------------------------ [2002-03-11 17:55:41] asd@suespammers.org Often, I'm left writing things like: <input type="text" name="yada" value="<?php echo htmlspecialchars($var) ?>"> It'd be nice if PHP let you write this instead: <input tupe="text" name="yada" value="<?php $var ?>"> with the echo and htmlspecialchars implied. Or at least the echo implied. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16007&edit=1

« previous php.bugs (#2261) next »