pull/8047/head
Yuichiro Yamashita 4 years ago
parent ae3c36538a
commit eaed19dc6b

@ -57,10 +57,10 @@ function get_entity_pattern(is_attribute_value: boolean) {
} }
const entity_pattern_content = get_entity_pattern(false); const entity_pattern_content = get_entity_pattern(false);
const entity_pattern_attri_value = get_entity_pattern(true); const entity_pattern_attr_value = get_entity_pattern(true);
export function decode_character_references(html: string, is_attribute_value: boolean) { export function decode_character_references(html: string, is_attribute_value: boolean) {
const entity_pattern = is_attribute_value ? entity_pattern_attri_value : entity_pattern_content; const entity_pattern = is_attribute_value ? entity_pattern_attr_value : entity_pattern_content;
return html.replace(entity_pattern, (match, entity) => { return html.replace(entity_pattern, (match, entity) => {
let code; let code;

Loading…
Cancel
Save