Add a trademark to a word everywhere on a site I've tried a few different techniques now but I can't get one to work reliably across all content. What I need to do is have all instances of the business name include a trademark symbol:

ie -> DinosaurCakes  becomes DinosaurCakes&lt;sup&gt;&amp;tm;&lt;/sup&gt;
or
Would you like some DinosaurCakes? becomes Would you like some DinosaurCakes&lt;sup&gt;&amp;tm;&lt;/sup&gt;

The javascript version I was trying to do was looping through the page on load and replacing the string with the function I found here-> http://james.padolsey.com/javascript/find-and-replace-text-with-javascript/
But it isn;t digging in to all of the child nodes for some reason and so some versions of the string don;t get replaced.

I then tried to do it in Drupal via hook_page_alter with:

function dinosaur_page_alter(&amp;$page) {
    // attempting to add the DinosaurCake (tm) marks using page_alter
    // find all '#markup' and then scan for terms
    function display_array(&amp;$your_array){
      foreach ($your_array as $key =&gt; &amp;$value){
        if (is_array($value)){
          display_array($value);
        }
        elseif (is_string($value) &amp;&amp; $key === "#markup") {
          $value = str_replace(array('DinosaurCakes"), array('DinosaurCakes&lt;sup class="reg"&gt;&amp;tm;&lt;/sup&gt;'), $value);
        }
      }
    }
    display_array($page);
}


However, using this method, it doesn't work on headings and does apply to title attributes and pathnames which of course breaks everything.

Any ideas on the best way to attack this?
You can use "String Overrides" (http://drupal.org/project/stringoverrides) module to accomplish what you want to do and it will work even if JavaScript is disabled and the changes will be cached as well by the Drupal cache.

Note: This will work with content pass by the t() function, if you have the word hard coded on the theme or module it will not work. Also it is CaSe SeSiTiVe.