Improved the function that automatically creates a label from a url.

Change-Id: Ia4c5acb79be58a937dd8a4f19f7ef8296f599824