I would not say that the problem is in html-tags, and the console normally displays a similar line, I don’t know, but the reason is probably in < and > , which are special characters and most likely the display problem with them, I won’t tell the reason, however I would still like to know it, so still try to replace these characters in this method with equivalents
< - <
> - >
Ie in the end you should be able to:
.replaceAll(name, "<a href=\""+name+".html\">"+name+"</a>");
UPD: In general, the most likely reason is the use of methods for extracting text from html-code, since I have not encountered such problems in practice.
nameand that intextWithLinks.... most likely it just doesn’t find your name - Alexey Shimansky