Skip to content

Instantly share code, notes, and snippets.

@2shortplanks
Created October 14, 2014 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 2shortplanks/da718370e8ca78efa396 to your computer and use it in GitHub Desktop.
Save 2shortplanks/da718370e8ca78efa396 to your computer and use it in GitHub Desktop.
Problem with Mojo::DOM and <dl>...</dl>
#!/usr/bin/perl
use strict;
use warnings;
use Test::More tests => 1;
use Mojo::DOM;
my $string = <<'ENDHTML';
<dl>
<dt>foo</dt>
<dd>
<dl>
<dt>bar</dt>
<dd>baz</dd>
</dl>
</dd>
</dl>
ENDHTML
my $got = Mojo::DOM->new($string) . "";
is($got,$string);
__END__
1..1
not ok 1
# Failed test at /tmp/fred.pl line 22.
# got: '<dl>
# <dt>foo</dt>
# <dd>
# <dl>
# </dl></dd><dt>bar</dt>
# <dd>baz</dd>
# </dl>
#
#
# '
# expected: '<dl>
# <dt>foo</dt>
# <dd>
# <dl>
# <dt>bar</dt>
# <dd>baz</dd>
# </dl>
# </dd>
# </dl>
# '
# Looks like you failed 1 test of 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment