编辑:htmlhint-kses.js
/* global HTMLHint */ /* eslint no-magic-numbers: ["error", { "ignore": [0, 1] }] */ HTMLHint.addRule({ id: 'kses', description: 'Element or attribute cannot be used.', init: function( parser, reporter, options ) { 'use strict'; var self = this; parser.addListener( 'tagstart', function( event ) { var attr, col, attrName, allowedAttributes, i, len, tagName; tagName = event.tagName.toLowerCase(); if ( ! options[ tagName ] ) { reporter.error( 'Tag <' + event.tagName + '> is not allowed.', event.line, event.col, self, event.raw ); return; } allowedAttributes = options[ tagName ]; col = event.col + event.tagName.length + 1; for ( i = 0, len = event.attrs.length; i < len; i++ ) { attr = event.attrs[ i ]; attrName = attr.name.toLowerCase(); if ( ! allowedAttributes[ attrName ] ) { reporter.error( 'Tag attribute [' + attr.raw + ' ] is not allowed.', event.line, col + attr.index, self, attr.raw ); } } }); } });
保存文件
位置:
home
/
fembzvrs
/
zimeza.com
/
wp-includes
/
js
/
codemirror
批量上传
创建
创建
批量权限
批量删除
名称
权限
大小
修改时间
操作
↑ 返回上级
-
-
-
-
codemirror.min.js
-rw-r--r--
571.69 KB
2017-09-13 10:08
编辑
下载
权限
删除
重命名
fakejshint.js
-rw-r--r--
1002 B
2018-01-23 06:29
编辑
下载
权限
删除
重命名
htmlhint-kses.js
-rw-r--r--
984 B
2017-09-13 10:08
编辑
下载
权限
删除
重命名
htmlhint.js
-rw-r--r--
17.32 KB
2017-09-13 10:08
编辑
下载
权限
删除
重命名