Edit File by line
/home/barbar84/public_h.../wp-inclu.../js/codemirr...
File: htmlhint-kses.js
/* global HTMLHint */
[0] Fix | Delete
/* eslint no-magic-numbers: ["error", { "ignore": [0, 1] }] */
[1] Fix | Delete
HTMLHint.addRule({
[2] Fix | Delete
id: 'kses',
[3] Fix | Delete
description: 'Element or attribute cannot be used.',
[4] Fix | Delete
init: function( parser, reporter, options ) {
[5] Fix | Delete
'use strict';
[6] Fix | Delete
[7] Fix | Delete
var self = this;
[8] Fix | Delete
parser.addListener( 'tagstart', function( event ) {
[9] Fix | Delete
var attr, col, attrName, allowedAttributes, i, len, tagName;
[10] Fix | Delete
[11] Fix | Delete
tagName = event.tagName.toLowerCase();
[12] Fix | Delete
if ( ! options[ tagName ] ) {
[13] Fix | Delete
reporter.error( 'Tag <' + event.tagName + '> is not allowed.', event.line, event.col, self, event.raw );
[14] Fix | Delete
return;
[15] Fix | Delete
}
[16] Fix | Delete
[17] Fix | Delete
allowedAttributes = options[ tagName ];
[18] Fix | Delete
col = event.col + event.tagName.length + 1;
[19] Fix | Delete
for ( i = 0, len = event.attrs.length; i < len; i++ ) {
[20] Fix | Delete
attr = event.attrs[ i ];
[21] Fix | Delete
attrName = attr.name.toLowerCase();
[22] Fix | Delete
if ( ! allowedAttributes[ attrName ] ) {
[23] Fix | Delete
reporter.error( 'Tag attribute [' + attr.raw + ' ] is not allowed.', event.line, col + attr.index, self, attr.raw );
[24] Fix | Delete
}
[25] Fix | Delete
}
[26] Fix | Delete
});
[27] Fix | Delete
}
[28] Fix | Delete
});
[29] Fix | Delete
[30] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function