fix bug: replace link href fail when url has search part
code style