fixed templates, breaks and spaces in links