@ -40,11 +42,9 @@ export function decode_character_references(html, is_attribute_value) {
// Handle named entities
// Handle named entities
if(entity[0]!=='#'){
if(entity[0]!=='#'){
code=entities[entity];
code=entities[entity];
}
}elseif(entity[1]==='x'){
elseif(entity[1]==='x'){
code=parseInt(entity.substring(2),16);
code=parseInt(entity.substring(2),16);
}
}else{
else{
code=parseInt(entity.substring(1),10);
code=parseInt(entity.substring(1),10);
}
}
if(!code){
if(!code){
@ -106,7 +106,11 @@ const disallowed_contents = new Map([
['dd',newSet(['dt','dd'])],
['dd',newSet(['dt','dd'])],
[
[
'p',
'p',
newSet('address article aside blockquote div dl fieldset footer form h1 h2 h3 h4 h5 h6 header hgroup hr main menu nav ol p pre section table ul'.split(' '))
newSet(
'address article aside blockquote div dl fieldset footer form h1 h2 h3 h4 h5 h6 header hgroup hr main menu nav ol p pre section table ul'.split(
' '
)
)
],
],
['rt',newSet(['rt','rp'])],
['rt',newSet(['rt','rp'])],
['rp',newSet(['rt','rp'])],
['rp',newSet(['rt','rp'])],
@ -134,7 +138,3 @@ export function closing_tag_omitted(current, next) {