I have basic html stored in my database, which includes html such as the anchor tag.
I am storing all & in the database as &
However, when the data is displayed back on the screen, the anchor tags stop working because the & in the links become &.
The problem is, the rest of the content around the anchor tag should remain as &
For example
The database content might look like this
<p>this is paragraph 1 & this is <a href="http://www.companyname.com/page.php?paragraph=2&sentence=4">paragraph 2</a>.</p>
The & in the url becomes & which stops the url from working, but at the same time, the & in the
tab any any other tag should remain as &
Both the & in the href and in the
<p>should be encoded as&to be validSource: http://htmlhelp.com/tools/validator