More efficient smilie replacing
Merge pull request #299 from toclimb/smilies-fix

More efficient smilie replacing (see pull request #291)