From 6ae8508413d65ab14afdacbc48c20f01200384bf Mon Sep 17 00:00:00 2001 From: Ben Jackson Date: Sun, 3 Oct 2021 11:56:08 -0700 Subject: [PATCH] html_sanitizer: Demote H1 tags (#2190) Generalize clipper.js support for removing H1 tags so it also applies to imports. This will move all heading levels down to make room if needed, only leaving duplicates at H6. --- src/routes/api/clipper.js | 5 +---- src/services/html_sanitizer.js | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/routes/api/clipper.js b/src/routes/api/clipper.js index ad6316f66..079dcc702 100644 --- a/src/routes/api/clipper.js +++ b/src/routes/api/clipper.js @@ -104,10 +104,7 @@ function createNote(req) { } function processContent(images, note, content) { - let rewrittenContent = htmlSanitizer.sanitize(content) - // H1 is not supported so convert it to H2 - .replace(/