Re: [PATCH] Bug #43896 htmlspecialchars returns empty string on invalid unicode sequence

From: Date: Fri, 25 Jan 2008 22:22:52 +0000
Subject: Re: [PATCH] Bug #43896 htmlspecialchars returns empty string on invalid unicode sequence
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-34934@lists.php.net to get a copy of this message
Should really theses functions discard the whole string for a single incomplete sequence ?
I think since it is not possible to recover true content of the string, it is ok to return failure value. Cutting it in random places or ignoring problems doesn't seem a good idea - it might lead to all kinds of nasty things, such as security filtering checking one data and database getting entirely different data. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

« previous php.internals (#34934) next »