transform while to for when reading file content
Extract interface for html escape strategy