Stop text input from changing tm to ™
By default, OS X has system-wide symbol and text substitution. You can disable this one substitution, all substitutions or even modify the TM trigger so you are less likely to accidentally trigger a ™ inadvertently.

System Preferences > Language &amp; Text > Text pane/tab