Fixed an oversight in string replacment, and fixed imgur preview when on a /gallery/ link