protect against preview being nil for .html_safe