Thanks for the suggestion Jacob. To be honest I'm happy enough with the provided code - except for being confused about why it filters out '+' characters and replaces with space characters. I know that certain characters are special in URLs (such as '%') but AFAIK the '+' character is just a normal character, like 'a', 'b' or 'c'. Unless somebody knows different...