Fix popup body handling code for media.