Unescape query string before gsubbing

@natejgreene