I think it would be better if you did these string replacements in the helper functions such as this one: https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/share/spice/video/video.js#L137

It's much cleaner that way. :)