code: function filter_attributes(str) {
          var comments = /\/\*.*?\*\//g;
          return str.replace(/\s*[a-z-]+\s*=\s*'[^']*'/gi, function (m) {
              return m.replace(comments, '');
          }).replace(/\s*[a-z-]+\s*=\s*"[^"]*"/gi, function (m) {
              return m.replace(comments, '');
          }).replace(/\s*[a-z-]+\s*=\s*[^\s]+/gi, function (m) {
              return m.replace(comments, '');
          });
      }
docs: Filter Attributes - filters tag attributes for consistency and safety