replacing '[]' on links