cleaning up url tags in templates