run:R W Run
15.53 KB
2026-03-11 16:18:51
R W Run
571.69 KB
2026-03-11 16:18:51
R W Run
358.17 KB
2026-03-11 16:18:51
R W Run
276.51 KB
2026-03-11 16:18:51
R W Run
1002 By
2026-03-11 16:18:51
R W Run
984 By
2026-03-11 16:18:51
R W Run
17.32 KB
2026-03-11 16:18:51
R W Run
15.81 KB
2026-03-11 16:18:51
R W Run
error_log
📄htmlhint-kses.js
1/* global HTMLHint */
2/* eslint no-magic-numbers: ["error", { "ignore": [0, 1] }] */
3HTMLHint.addRule({
4 id: 'kses',
5 description: 'Element or attribute cannot be used.',
6 init: function( parser, reporter, options ) {
7 'use strict';
8
9 var self = this;
10 parser.addListener( 'tagstart', function( event ) {
11 var attr, col, attrName, allowedAttributes, i, len, tagName;
12
13 tagName = event.tagName.toLowerCase();
14 if ( ! options[ tagName ] ) {
15 reporter.error( 'Tag <' + event.tagName + '> is not allowed.', event.line, event.col, self, event.raw );
16 return;
17 }
18
19 allowedAttributes = options[ tagName ];
20 col = event.col + event.tagName.length + 1;
21 for ( i = 0, len = event.attrs.length; i < len; i++ ) {
22 attr = event.attrs[ i ];
23 attrName = attr.name.toLowerCase();
24 if ( ! allowedAttributes[ attrName ] ) {
25 reporter.error( 'Tag attribute [' + attr.raw + ' ] is not allowed.', event.line, col + attr.index, self, attr.raw );
26 }
27 }
28 });
29 }
30});
31