Keith Devens .com |
Wednesday, October 8, 2008 | ![]() |
| ... be conservative in what you do, be liberal in what you accept from others. – Jon Postel (RFC 793) | ||
|
| ← Error Theory: Divorcing principle from necessity: the two minds of Keifer Sutherland | Quitting the Paint Factory, by Mark Slouka → |

Adam V. (http://flangy.com) wrote:
Keith (http://keithdevens.com/) wrote:
Yeah, that's the type of thing I was referring to when I was talking about prepared statements.
x-way (http://waterwave.ch/weblog) wrote:
Smarty doesn't do automatic escaping, but you can force it with modifiers:
{$var|escape}
translates to
<?php echo htmlspecialchars($var); ?>
Keith (http://keithdevens.com/) wrote:
Yeah, I know. But I never see anyone using them where they should be.
Feel free to post a comment below. Please see my comment policy.
Formatting Rules (No HTML):
Generated in about 0.116s.
(Used 8 db queries)

As an alternative to escaping, use a "real DB" whose API has support for commands and parameters. I think MySQL DB is sprouting this feature soonish.