If I have string named codeText. Sometimes that string starts with a <p> and other times not. Can anyone tell me how I can check if it starts with <p> and if it doesn’t then how can I add the <p> to the start and </p> to the end.
If I have string named codeText. Sometimes that string starts with a <p> and
Share
Like this:
If you somehow know that the HTML string does not contain any malicious Javascript, you don’t want to call
HtmlEncode.