Fix some bugs with html escaping

For build and test module with Makefile.PL install Module::Install::CPANfile and run:
$ perl Makefile.PL && make && make test