[Html-widget] HTML::Element bug (was Re: Bug in HTML::Widget::Constraint::In)
Bernhard Graf
html-widget at augensalat.de
Wed Oct 18 14:43:12 CEST 2006
Carl Franks wrote:
> On 18/10/06, Bernhard Graf <html-widget at augensalat.de> wrote:
> > Oh sorry. In my setup I had to disable HTML::Widget tests because I
> > patched HTML::Element as in
> > http://lists.rawmode.org/pipermail/catalyst/2006-May/007646.html .
> >
> > Without this patch HTML::Widget is virtually worthless in a unicode
> > environment. Or are there smarter ways to dodge this bug?
>
> Hmm, I've just applied that patch to my local HTML::Element, and all
> HTML::Widget's tests still pass ok.
> Do you get failures?
Yes.
I checked it again and learned that this happens due to the fact that my
_xml_escape() is a little different:
sub _xml_escape { # DESTRUCTIVE (a.k.a. "in-place")
local $_;
foreach (@_) {
s/&/&/go;
s/</</go;
s/>/>/go;
s/"/"/go;
}
return;
}
The error is:
t/filter_htmlescape......................NOK 3
# Failed test 'XML output is double encoded'
# in t/filter_htmlescape.t at line 28.
# '<form id="widget" method="post"><fieldset class="widget_fieldset"><input class="textfield" id="widget_foo" name="foo" type="text" value="&lt;p&gt;message&lt;/p&gt;" /></fieldset></form>
# '
# doesn't match '(?x-ism:\ value\=\"\&\#38\;lt\;p\&\#38\;gt\;message\&\#38\;lt\;\/p\&\#38\;gt\;\"\
# )'
# Looks like you failed 1 test of 3.
t/filter_htmlescape......................dubious
Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 3
Failed 1/3 tests, 66.67% okay
--
Bernhard Graf
More information about the Html-widget
mailing list