code: function stripTags(input, allowed) {
          allowed = (((allowed || '') + '').toLowerCase().match(/<[a-z][a-z0-9]*>/g) || []).join(''); // Making sure the allowed arg is a string containing only tags in lowercase (<a><b><c>)
  
          var tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>/gi;
          var commentsAndPhpTags = /<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;
  
          return stringHelpers.strCompact(input.replace(commentsAndPhpTags, '').replace(tags, function ($0, $1) {
              return allowed.indexOf('<' + $1.toLowerCase() + '>') > -1 ? $0 : ' ';
          }));
      }
docs: Native javascript function to emulate the PHP function strip_tags.
  
  @param {String}        str       The original HTML string to filter.
  @param {String|Array}  allowed   A tag name or array of tag names to keep
  @returns {string} The filtered HTML string.
  @example