feat: pulling score from whitelist

This commit is contained in:
Adam Pash 2016-10-17 16:26:16 -07:00
parent 94321111e9
commit 3b87b557be

View File

@ -18,7 +18,7 @@ export const STRIP_OUTPUT_TAGS = [
export const REMOVE_ATTRS = ['style', 'align']; export const REMOVE_ATTRS = ['style', 'align'];
export const REMOVE_ATTR_SELECTORS = REMOVE_ATTRS.map(selector => `[${selector}]`); export const REMOVE_ATTR_SELECTORS = REMOVE_ATTRS.map(selector => `[${selector}]`);
export const REMOVE_ATTR_LIST = REMOVE_ATTRS.join(','); export const REMOVE_ATTR_LIST = REMOVE_ATTRS.join(',');
export const WHITELIST_ATTRS = ['src', 'srcset', 'href', 'class', 'id', 'alt', 'score']; export const WHITELIST_ATTRS = ['src', 'srcset', 'href', 'class', 'id', 'alt'];
export const WHITELIST_ATTRS_RE = new RegExp(`^(${WHITELIST_ATTRS.join('|')})$`, 'i'); export const WHITELIST_ATTRS_RE = new RegExp(`^(${WHITELIST_ATTRS.join('|')})$`, 'i');
// removeEmpty // removeEmpty