Fix rich text formatting