I'm storing an HTML values in my database then I output it on my site.
There was an HTML value that has a "cut off" HTML (I don't have control on the HTML, since I'm getting it on a different website" ), meaning to say, it looks like this
<a href="http://site.com
When I output this on my site I'm having a problem because below those "cut off" HTML, other HTML will be affected, so it looks like this (example)
<a href="http://site.com <input type="button" value="test" />
My question here is that how would I know if an HTML is being cut off, then if it has been cut off, I want to close it by simple closing it with " or />