JavaScript error when selecting a tag

I guess it’s caused by this clever tag: