Strip HTML using pure Javascript


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function stripHTML(string) {
  2. return string.replace(/<(.|\n)*?>/g, '');
  3. }

URL: http://stackoverflow.com/questions/24816/escaping-strings-with-jquery

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.