projects
/
website.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c1e3c3
)
Added the tabindex attribute to every <pre> tag.
author
sabadev
<saba@sabadev.xyz>
Sat, 27 Mar 2021 15:14:20 +0000
(11:14 -0400)
committer
sabadev
<dev@sabadev.xyz>
Tue, 13 Apr 2021 01:16:42 +0000
(21:16 -0400)
src/Sanitize.hs
patch
|
blob
|
history
diff --git
a/src/Sanitize.hs
b/src/Sanitize.hs
index
734939f
..
b06c203
100644
(file)
--- 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]