let preview use blogtemplate setting, fix double encoding in javascript