remove unwanted characters, like spaces from tag name

(cherry picked from commit 6aa6c089450138c973945485a7733322b32799f1)
Don't include : as allowed character after link.

It should be, but we have code that generates this text
from cf-sketch and leads to false positives.

(cherry picked from commit 3143fe1c071348fe976568c52c75884f19941bbd)