Fix potential for nastiness in the dashboard

Also clean up the conditional for jsdebug to not duplicate <script>
lines
Merge pull request #392 from SEJeff/fix-dashboard-xss-master

Fix potential for nastiness in the dashboard