fix 5.5 url replace callback not handling special characters properly