added a html encoder. Fixed preview content feature.