[Html-widget] strange error with HTMLEscape filter when installing latest from CPAN

Carl Franks fireartist at gmail.com
Fri Dec 1 16:09:22 GMT 2006


On 01/12/06, John Napiorkowski <jjn1056 at yahoo.com> wrote:
> Hi,
>
> I was setting up a new server (nothing like installing
> on a clean box) when I got the following error in the
> tests for HTML::Widget:
>
> Cannot determine perl version info from
> lib/HTML/Widget.pm
>
> #   Failed test 'XML output is double encoded'
> #   at t/filter_htmlescape.t line 28.
> #                   '<form id="widget"
> method="post"><fieldset class="widget_fieldset"><
> input class="textfield" id="widget_foo" name="foo"
> type="text" value="<p>message&l
> t;/p>" /></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.
>
> I've been poking around and can't seem to figure out
> if there is a missing dependency.  The html escape
> filter is just doing a regex, nothing crazy, so I
> can't figure this out.
>
> Has anyone seen this?
>
> I'm setting this up on Ubuntu Server with Perl 5.8.8
> setup.  I have a custom install script that loads all
> my app prequisites and external libraries.  I've used
> this before on other boxes but not since the latest
> round of HTML Widget updates.

Yeah, the latest version of HTML::Element has fixed the unicode
encoding problem, but it's introduced a questionable feature, in that
it won't encode any '&' which looks like it's already part of a
HTML-encoded intity.
This means the double-encoding test fails.

I've been communicating with the author, he felt the feature was
needed, but I've pointed out that the previous behaviour of
HTML::Element was that it encoded everything except "~literal"
pseudo-elements, so the feature is unnecessary. I've not had a
response to that in the past couple days, but I'm hopeful that he'll
relent!

Carl



More information about the Html-widget mailing list