Various pieces of the tagging system will break if the tag name contains slashes or commas (e.g. T27151), so that should be checked for.
Recent changes have added the necessary validation to core, so it just needs factoring out there then calling here.