I’m giving the ability to insert html as text via textbox multiline which then inserted to literal
//-----Page-----------
//--------------------
//-------------------
//--| Literal |-----
//-------------------
//--------------------
I don’t want to use html editor
the text of the textbox which is html tags is inserted in the middle of the page to a specific literal.
but sometimes they forget to end Tags. like </xxx>
so the whole page is messed up
i tried to wrap all the content with div but no success.
how can i reslove it that even when the html (inner html) is not completed – the whole page wont messed up ?
What you have here just asks for Cross Site Scripting attack.
I don’t understand why you don’t want to use HTML editor to edit HTML.
You would have to parse the string on the server and fix any problems. I would recommend using HtmlAgilityPack for parsing malformed html.