Integrate new engine, correct old specs

corrects edge cases with

- full quotes
- [url] with nested tags
- engine overrides
- onebox applying to non http srcs
This commit is contained in:
Sam
2017-07-12 16:59:58 -04:00
parent ee470b5317
commit f1b38ba4fb
10 changed files with 341 additions and 780 deletions

View File

@ -227,10 +227,11 @@ export function setup(opts, siteSettings, state) {
opts.markdownIt = true;
opts.setup = true;
if (!opts.discourse.sanitizer) {
if (!opts.discourse.sanitizer || !opts.sanitizer) {
const whiteLister = new WhiteLister(opts.discourse);
opts.sanitizer = opts.discourse.sanitizer = (!!opts.discourse.sanitize) ? a=>sanitize(a, whiteLister) : a=>a;
}
}
export function cook(raw, opts) {