closes #5: escape html and process newlines