I have a wordpress plugin that automatically hyperlinks terms in the posts and pages to other posts, however at the moment it is doing a simple match on the full content of the post and this is causing it to break some html. I need you to improve the plugin, while maintaining existing functions, so that it does not insert hyperlinks into any existing hyperlink.
Example:
Some text some text KEYWORD some text (a href="http://wwww.example.com/path/KEYWORD.html") some text KEYWORD some text (/a) some text KEYWORD some text.
In the above post the KEYWORD occurs four times, and the current plugin will hyperlink all four. But this is WRONG. It should only hyperlink the first and the last ones, and not change those which are part of existing hyperlinks.