Fixed some issues in jsrouting

Removal of werkzeug.templates had left some JS broken