Escaping attachment ID before insertion in DOM