From 25f3b26bc22635fee65f484ffe45a04a626773a3 Mon Sep 17 00:00:00 2001 From: sabadev Date: Sat, 27 Mar 2021 11:14:20 -0400 Subject: [PATCH] Added the tabindex attribute to every
 tag.

---
 src/Sanitize.hs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/Sanitize.hs b/src/Sanitize.hs
index 734939f..b06c203 100644
--- a/src/Sanitize.hs
+++ b/src/Sanitize.hs
@@ -8,4 +8,5 @@ sanitizeHtml :: Html () -> Html ()
 sanitizeHtml = toHtmlRaw . renderTree . transformTree sanitizeTree . parseTree . renderText
 
 sanitizeTree :: TagTree T.Text -> [TagTree T.Text]
-sanitizeTree = pure
+sanitizeTree (TagBranch "pre" attributes children) = [TagBranch "pre" (("tabindex", "0") : attributes) children]
+sanitizeTree x = [x]
-- 
2.20.1