Skip to content

Instantly share code, notes, and snippets.

@kirpalmakanga
Created October 10, 2018 08:54
Show Gist options
  • Save kirpalmakanga/28f7b3163d9fb6c86bcc9c666bf566b3 to your computer and use it in GitHub Desktop.
Save kirpalmakanga/28f7b3163d9fb6c86bcc9c666bf566b3 to your computer and use it in GitHub Desktop.
Check if string contains html tags
export const containsHTML = (str) => /<[a-z][\s\S]*>/i.test(str);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment