public/javascripts/vendor/javascripts/validator.js
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, '');
        });
    }
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, '');
        });
    }
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 , '' ) ; } ) ; }
Filter Attributes - filters tag attributes for consistency and safety
Filter Attributes - filters tag attributes for consistency and safety