The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Test::DoubleEncodedEntities - check for double encoded entities

SYNOPSIS

  use Test::More tests => 1;
  use Test::DoubleEncodedEntities;

  ok_dee('<html><body>&amp;eacute;</body></html>', "ent test");

DESCRIPTION

This is a testing module that checks for double encoded entities in your string. It exports one function ok_dee that does the testing. You should pass it the html you want to test and optionally the name for the test. It will run the test producing Test::Harness compatible output, and will return 1 on a pass and 0 on a failure.

Note that this only checks the body text; Entities in attributes are ignored as often you may want to double encoded entities on purpose in things like URLs.

This module knows about all the entities defined in the HTML 4.0 specification, and numerical entities.

AUTHOR

  Copyright Mark Fowler 2004.  All rights reserved.

  This program is free software; you can redistribute it
  and/or modify it under the same terms as Perl itself.

SEE ALSO

Test::DoubleEncodedEntities::Entities