Trailing space removal from tags