Fix url handling when using xblock from external site