HTML-StripScripts-Regex

 view release on metacpan or  search on metacpan

t/50flow.t  view on Meta::CPAN

  [ 'space',             q{ }, q{ } ],
  [ 'plain',             q{hello mum},      q{hello mum} ],
  [ 'plain nl',          qq{hello mum\n},    "hello mum\n" ],
  [ 'nonprint',          qq{foo\0bar}, "foo bar" ],
  [ 'p tag',             qq{<p>hello mum\n}, "<p>hello mum\n</p>" ],
  [ 'i tag',             qq{<i>hello mum\n}, "<i>hello mum\n</i>" ],
  [ 'valid p',           q{<ins><p>valid p</p></ins>}, q{<ins><p>valid p</p></ins>} ],
  [ 'misplaced tr',      q{misplaced <tr>}, q{misplaced <!--filtered-->} ],
  [ 'misplaced td',      q{misplaced <td>}, q{misplaced <!--filtered-->} ],
  [ 'misplaced li',      q{misplaced <li>}, q{misplaced <!--filtered-->} ],
  [ 'misplaced cdata',   q{<table><tr>misplaced cdata<td>hello}, q{<table><tr></tr></table>misplaced cdata<!--filtered-->hello} ],
  [ 'pass emtpy img',    q{<img>}, q{<img />} ],
  [ 'block img src',     q{<img src="http://example.com/foo.png" />}, q{<img />} ],
  [ 'block a href',      q{<a href="http://foo.foo/foo">x}, q{<a>x</a>} ],
  [ 'block a mailto',    q{<a href="mailto:foo@foo.foo">x}, q{<a>x</a>} ],
  [ 'unknown tag',       q{<foo>}, q{<!--filtered-->} ],
  [ 'unknown attr',      q{<i foo=foo>}, q{<i></i>} ],
  [ 'misplaced close',   q{</i>}, q{<!--filtered-->} ],
  [ 'br',                q{<br>hello</br>}, q{<br />hello<!--filtered-->} ],
  [ 'hr width',          q{x<hr width=4>y}, q{x<hr width="4" />y} ],
  [ 'hr width dq',       q{x<hr width="4">y}, q{x<hr width="4" />y} ],



( run in 0.296 second using v1.01-cache-2.11-cpan-454fe037f31 )