Fixed bug in handling # and ? in links.