Created
October 10, 2018 08:54
-
-
Save kirpalmakanga/28f7b3163d9fb6c86bcc9c666bf566b3 to your computer and use it in GitHub Desktop.
Check if string contains html tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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