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

2008-01-26 Thread Arnaud.lb
> > 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 mig

[PHP-DEV] [PATCH] Bug #43896 htmlspecialchars returns empty string on invalid unicode sequence

2008-01-24 Thread Arnaud.lb
more consistent with previous PHP versions, keeping the fixes that was made in the get_next_char() internal function. The patch: http://s3.amazonaws.com/arnaud.lb/php_htmlentities_utf.patch The bug entry: http://bugs.php.net/bug.php?id=43896 -- PHP Internals - PHP Runtime Development Mailing

[PHP-DEV] [PATCH] Bug#42718 (FILTER_UNSAFE_RAW not applied when configured as default filter, even with flags)

2007-09-29 Thread Arnaud.lb
Hi, Here is a patch to fix bug #42718: http://bugs.php.net/?id=42718&edit=1 The "unsafe_raw" filter is not applied when configured as default filter. I found that the php_sapi_filter() internal function in ext/filter/filter.c intentionally bypass this filter: if (!(IF_G(default_filter) == FI