aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-01-20 20:27:49 +0100
committerSimon Ser <contact@emersion.fr>2020-01-20 20:27:49 +0100
commitd19c17c6d58bcdecbb03125bd4f57b703d726ce5 (patch)
treeeebc2bbd6151322c77b9a15ff6f75a23f049dd1b
parent589b303f9ff49a87c6a64e51379207a809da6a48 (diff)
downloadalps-d19c17c6d58bcdecbb03125bd4f57b703d726ce5.tar.gz
alps-d19c17c6d58bcdecbb03125bd4f57b703d726ce5.zip
go fmt
-rw-r--r--plugins/base/sanitize_html.go78
1 files changed, 39 insertions, 39 deletions
diff --git a/plugins/base/sanitize_html.go b/plugins/base/sanitize_html.go
index aba47d6..a82c852 100644
--- a/plugins/base/sanitize_html.go
+++ b/plugins/base/sanitize_html.go
@@ -6,65 +6,65 @@ import (
"regexp"
"strings"
- "golang.org/x/net/html"
- "github.com/microcosm-cc/bluemonday"
"github.com/aymerick/douceur/css"
cssparser "github.com/chris-ramon/douceur/parser"
+ "github.com/microcosm-cc/bluemonday"
+ "golang.org/x/net/html"
)
// TODO: this doesn't accomodate for quoting
var (
- cssURLRegexp = regexp.MustCompile(`url\([^)]*\)`)
+ cssURLRegexp = regexp.MustCompile(`url\([^)]*\)`)
cssExprRegexp = regexp.MustCompile(`expression\([^)]*\)`)
)
var allowedStyles = map[string]bool{
- "direction": true,
- "font": true,
- "font-family": true,
- "font-style": true,
- "font-variant": true,
- "font-size": true,
- "font-weight": true,
- "letter-spacing": true,
- "line-height": true,
- "text-align": true,
+ "direction": true,
+ "font": true,
+ "font-family": true,
+ "font-style": true,
+ "font-variant": true,
+ "font-size": true,
+ "font-weight": true,
+ "letter-spacing": true,
+ "line-height": true,
+ "text-align": true,
"text-decoration": true,
- "text-indent": true,
- "text-overflow": true,
- "text-shadow": true,
- "text-transform": true,
- "white-space": true,
- "word-spacing": true,
- "word-wrap": true,
- "vertical-align": true,
-
- "color": true,
- "background": true,
- "background-color": true,
- "background-image": true,
+ "text-indent": true,
+ "text-overflow": true,
+ "text-shadow": true,
+ "text-transform": true,
+ "white-space": true,
+ "word-spacing": true,
+ "word-wrap": true,
+ "vertical-align": true,
+
+ "color": true,
+ "background": true,
+ "background-color": true,
+ "background-image": true,
"background-repeat": true,
- "border": true,
- "border-color": true,
+ "border": true,
+ "border-color": true,
"border-radius": true,
- "height": true,
- "margin": true,
- "padding": true,
- "width": true,
- "max-width": true,
- "min-width": true,
+ "height": true,
+ "margin": true,
+ "padding": true,
+ "width": true,
+ "max-width": true,
+ "min-width": true,
"clear": true,
"float": true,
"border-collapse": true,
- "border-spacing": true,
- "caption-side": true,
- "empty-cells": true,
- "table-layout": true,
+ "border-spacing": true,
+ "caption-side": true,
+ "empty-cells": true,
+ "table-layout": true,
- "list-style-type": true,
+ "list-style-type": true,
"list-style-position": true,
}