When sending request to portal, I am seeing this at the beginning of HTML response:
// This variable must be used only to initialize other variables otherwise
// please use eXo.env.portal.context or eXo.env.portal.context instead
// Those 2 last variables cannot be used to initialize variables because
// we cannot be sure that they will be initialized before initializing your script
var currentContext = '/portal' ;
I wonder if it's possible to enclose the comment in groovy template within <% %> so that it won't be rendered in HTML? It can save us around 300 characters in each non-ajax HTML response.