mozilla/snippets-service — pull request #82 by koddsson (2014-11-08 00:17:16+00:00)
Title: Isolate snippet code

This is mostly the work of @Osmose that I took and did very very minor changes to and some rudimentary testing.

Tested on my setup for all even firefox versions in the range >10, <=34 and nightly and can confirm that it does not leak javascript between snippets. I for whatever reason couldn't run any version >=10 on my machine without it crashing :<

There is one slight drawback to this and it's that for some reason jinja2 (or some component) will escape snippets JSON if you visit a link directly ([like so]( http://localhost:8000/4/Firefox/36.0a1/20141105030203/Darwin_Universal-gcc3/en-US/release/Darwin%2013.4.0/default/default/)) making the JS throw an error and not run the snippet code. I wasn't sure if this is actually a feature we'd like to have or if this regression is OK since it will _not_ escape the JSON if it's loaded into the `about:home` page and therefor works perfectly there.

cc/ @glogiotatidis