break;
case 'text/html':
- if (!empty($this->attachment->filename) && common_config('attachments', 'show_html')) {
+ if (!empty($this->attachment->filename)
+ && (StatusNet::isAjax() || common_config('attachments', 'show_html'))) {
// Locally-uploaded HTML. Scrub and display inline.
$this->showHtmlFile($this->attachment);
break;