I am writing some javascript for my website.
I would like to be able to turn (using javascript) specific names into links.
for example, given the name Benjamin it would turn :
Hello my name is Benjamin
into
Hello my name is <a href='something'>Benjamin</a>
The trick is, I don't know what names I need to convert in advance, I receive those in an ajax response. Also, I need to be able to handle stuff along the lines of
<b>B</b>enjam<b>in</b>
while not touching stuff like
B<br />enja<br />min
I would like to know what would be the best practice for designing something able to do this sort of parsing. If there is a ready solution that would probably be better.
Thanks in advance for the help