Support embedding snippets on non UTF-8 HTMLs