I am having the file which contains the data as <!-- sample data --> ABC is commented using HTML Comments --> <html> <body> HTML Data </body> </html>
The whole file was formed by myself using java. For my project purpose am commenting some data's(dynamic data) in that file.
After the open comment am having the two close comments. Second one is the actual close comment first is the data. At the time of store and executing the file in browser it shows the ABC is commented using HTML comments --> after that only executing the html tags.
I want the solution to escape all the html comments without encoding (> or any numbers) except the last one in by file.
At the time of seeing the view source of my file it has to show the exact copy what i typed previous.