fix format erb file error when content has non-ascii characters