Added HTML entity encoding