[ic] Filters with UTF-8 body
David Christensen
david at endpoint.com
Thu Mar 12 13:07:19 UTC 2009
On Mar 12, 2009, at 5:31 AM, Peter wrote:
> On 03/12/2009 03:17 AM, Peter wrote:
>> On 03/12/2009 03:04 AM, Stefan Hornburg wrote:
>>> Peter Ajamian suggested that the following code in Interpolate.pm
>>> causes the problem:
>>>
>>> '_filter' => qr($T{_filter}\s+($Some)\]($Some)),
>>> my $Some = '[\000-\377]*?';
>>
>> More specifically $Some, $All, $XSome and $XAll will only parse 8 bit
>> characters in the range \000-\377. Not positive about this, but I
>> think
>> that changing them to the following will work:
>> my $All = '(?:(?s).*)';
>> my $Some = '(?:(?s).*?)';
>> my $XAll = qr{(?:(?s).*)};
>> my $XSome = qr{(?:(?s).*?)};
>
>
> On further reflection this would probably work just as well and is
> less
> complex looking:
> my $All = '[.\n]*';
> my $Some = '[.\n]*?';
> my $XAll = qr{[.\n]*};
> my $XSome = qr{[.\n]*?};
Reviewing the code, there are quite a few instances of with this same
assumption which should also be reviewed/revisited (found with `git
grep '[\\]377'`):
In specific, there are instances in:
code/SystemTag/row.coretag
code/UserTag/bar_button.tag
dist/lib/UI/Primitive.pm
dist/lib/UI/pages/admin/item_option_phantom.html
dist/lib/UI/pages/include/Options/old/item_option_modular
lib/Vend/Config.pm
lib/Vend/Form.pm
lib/Vend/Interpolate.pm
lib/Vend/MakeCat.pm
lib/Vend/Parse.pm
lib/Vend/Ship.pm
lib/Vend/Table/Common.pm
lib/Vend/Util.pm
Regards,
David
--
David Christensen
End Point Corporation
david at endpoint.com
212-929-6923
http://www.endpoint.com/
More information about the interchange-users
mailing list