How do you strip a string of HTML tags?

How to detect HTML in string JavaScript?

I want to find any element from a piece of html code, which is stored in string variable, and detect HTML.

For example I have this string: "Hello I am Stackoverflow", I need to find first , and then detect the 'Stackoverflow' content. How can I do this in JavaScript, or it's only possible in server side?
Edit: The answer @Daniel gave works very well, but when I use this string inside other function, and call that function from another function, I need to escape first every tag with function escapeHtmlString() method. Is it possible that the code work without these escapes function (if yes how? In this case does someone knows another method for this)? function wrapQuotes(content). Var str = " Hello I am "Stackoverflow"";. Str = wrapQuotes(str);. Console.log(str); var obj = document.querySelector('#elementId'); obj.innerHTML = str; There are few methods in Node.js to deal with HTML strings: escapeHtml - returns escaped text that may be injected in HTML code. UnEscapeHtml - restores html code back from escaped string. UnEscape Html String - It is similar to unEscapeHtml except it replaces. all characters that must be escaped with the closest HTML-safe equivalent. This answer might help you further.

Related Answers

How to remove HTML inside element in jQuery?

I have a string which contains HTML tags. I need to re...

What is Web design examples?

You can find old-school designers who insist they don't. And they'...

What type of data can be scraped?

The following types of data can be scraped by a bot: Data for news sites:...