Fixes incorrect position of contextual menu
Ooops, wasn't corectly encoding the metrics url passed to the server.
fixes the weird break with example functions that contained double-quotes