case 'rich':
case 'video':
case 'link':
- if (!empty($oembed->html) && common_config('attachments', 'show_html')) {
+ if (!empty($oembed->html)
+ && (StatusNet::isAjax() || common_config('attachments', 'show_html'))) {
require_once INSTALLDIR.'/extlib/htmLawed/htmLawed.php';
$config = array(
'safe'=>1,