This commit is contained in:
28
node_modules/hast-util-to-html/lib/constants.js
generated
vendored
Normal file
28
node_modules/hast-util-to-html/lib/constants.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
'use strict'
|
||||
|
||||
// Maps of subsets.
|
||||
// Each value is a matrix of tuples.
|
||||
// The first value causes parse errors, the second is valid.
|
||||
// Of both values, the first value is unsafe, and the second is safe.
|
||||
module.exports = {
|
||||
// See: <https://html.spec.whatwg.org/#attribute-name-state>.
|
||||
name: [
|
||||
['\t\n\f\r &/=>'.split(''), '\t\n\f\r "&\'/=>`'.split('')],
|
||||
['\0\t\n\f\r "&\'/<=>'.split(''), '\0\t\n\f\r "&\'/<=>`'.split('')]
|
||||
],
|
||||
// See: <https://html.spec.whatwg.org/#attribute-value-(unquoted)-state>.
|
||||
unquoted: [
|
||||
['\t\n\f\r &>'.split(''), '\0\t\n\f\r "&\'<=>`'.split('')],
|
||||
['\0\t\n\f\r "&\'<=>`'.split(''), '\0\t\n\f\r "&\'<=>`'.split('')]
|
||||
],
|
||||
// See: <https://html.spec.whatwg.org/#attribute-value-(single-quoted)-state>.
|
||||
single: [
|
||||
["&'".split(''), '"&\'`'.split('')],
|
||||
["\0&'".split(''), '\0"&\'`'.split('')]
|
||||
],
|
||||
// See: <https://html.spec.whatwg.org/#attribute-value-(double-quoted)-state>.
|
||||
double: [
|
||||
['"&'.split(''), '"&\'`'.split('')],
|
||||
['\0"&'.split(''), '\0"&\'`'.split('')]
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user