Fix some regressions in URL building and convert sessionedit to new URL
Clean whitespace in templates
Merge branch 'sessionedit-fix'

* sessionedit-fix:
  Clean whitespace in templates
  Fix some regressions in URL building and convert sessionedit to new URL