/** * @param {string} text * @return {string} */ function sanitizeHTML(text) { return $('<div>').text(text).html(); } COPY
// Checks if the string has a <script> tag Checker = new RegExp(`<[^>]*script`).test(`<script>`) console.log(Checker)