Added HTML escapes to prevent references from nuking the HTML output