If there were an easy solution to this issue, someone would have come up with it already. Especially since a lot of times what people fail to consider, is that it's "unique" to their computer because of some malware they picked up and didn't know about. Anyone reading that comment without this particular bit of malware on their system sees just the raw text as you posted it, while those with the malware see the links being injected into the post.
But even in the case where someone manages to do some kind of SQL injection attack on the raw content of the database powering the site, the only defense against that is making sure your database server is fully patched. Even then there's no guarantees, it just makes it as difficult as possible for any ne'er do-wells. Anyone who's done any sysadmin work is going to tell you that it's easy to say "Well just patch the server" but it's not so easy to do, especially with a "mission critical" system where every second of downtime is costing the company real money and any little hiccup in the process can mean disaster. It can be days in the planning to do just a simple update, even before you deal with the corporate politics that are a part of life in large companies, which can drag the process out for days, weeks, months maybe longer before you can find one date that doesn't conflict with anyone's pet project and everyone who needs to sign off can agree that such and such date is acceptable.
This is basically like the spam problem. If there were a simple and effective way to handle it, people would have done so already. Generally speaking though, the most effective methods require a fair bit of inconvenience for the user. From the perspective of the spammer, they really don't care if a couple of people have some kind of filter and it deletes their spam because there's probably 10 more people who don't and if even one of them makes the spammer money they consider it a success. One person out of every 10,000 (or more) might fall for some spam message, but that can turn into a fairly lucrative business model.
I had posted earlier a Reader's Comment for an op-ed in The Washington Post. A while after that, I looked at the newly posted comments of other readers. When I further casually looked at my own posted comment, I noticed to my great surprise that two hijackers (apparently different ones!) had sneakily arbitrarily used two words in my comment to create links for their own totally unrelated ads! (There was nothing provocative at all in my comment which could have prompted hijackers to choose my comment in particular for their hijacking.)
I have noticed the above hijacking phenomenon a few times in some web sites.
Now some expert will have to develop a way to enable people to create "firewalls" around whatever they might post anywhere on Internet so that no hijacker can do the above kind of hijacking. In the modern world, there invariably are some "techno-rats" along with technocrats, and technocrats constantly need to develop methods to prevent "techno-rats" from stealing cheese by sneaking into homes of people (if technocrats cannot successfully develop traps --with cheese as bait-- for the rats).