Text.sanitize would remove all formatting but still missed NBSP. Not sure why because it looks like it should remove, but it did not.
Text.toJagexName get's NBSP but leaves the <img> tags. Does change _ to a space but can look up on hiscores with a space instead of an underscore, and it works. So that would be fine unless we are worried about breaking anything that does an exact name search on the web request.
Did notice that clan broadcasts still display the name with NBSP. But felt like that was a whole other can of worms to look at how we should format message content.
I ended up with the result I did because it covered both edge cases.
I had a runaround with this one. Resolves #22 .
Text.sanitize
would remove all formatting but still missed NBSP. Not sure why because it looks like it should remove, but it did not.Text.toJagexName
get's NBSP but leaves the<img>
tags. Does change_
to aspace
but can look up on hiscores with a space instead of an underscore, and it works. So that would be fine unless we are worried about breaking anything that does an exact name search on the web request.I ended up with the result I did because it covered both edge cases.