replace links with url_for()