strip whitespace when saving links - fixes #149