Correction in string replacement algorithm

Since "//" is being replaced in the previous line, the line 921 never executes leaving the / in front of http. 
My quick and simple suggestion is to remove one of the / in the patterns. It works fine with that.