Add test case for HTML entities sanitization
Change unsafe link sanitize logic