Js fixes x 3

Fixes #1333 - slashes in snippet preview
Fixes #1343 - js error blocking Soliloquy from working (issue was re-introduced in d2defc75663e8516e67fb4b5bfbb5aa7f7a8ff24)
Fixes #1321 - double separator in snippet preview