add url_replace test, fix url_replace
unfix ugly case