fix unit tests and add htmlspechiachars to string