Fixed a string trimming issue with the URL cleaning function that would cause URLs with spaces in them to be split into an array. Replaced "shift()" with leading white space trimming.