diff options
author | Wim <wim@42.be> | 2019-02-24 15:13:56 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2019-02-24 15:13:56 +0100 |
commit | 96841c70c7d59d1c80f98db7dcdfc03620829758 (patch) | |
tree | df43223b443ab43949c68b265dee518ff3455c47 /vendor/github.com/russross/blackfriday/esc.go | |
parent | f92735d35d01388ca790c43ef54548ecafae6f92 (diff) | |
download | matterbridge-msglm-96841c70c7d59d1c80f98db7dcdfc03620829758.tar.gz matterbridge-msglm-96841c70c7d59d1c80f98db7dcdfc03620829758.tar.bz2 matterbridge-msglm-96841c70c7d59d1c80f98db7dcdfc03620829758.zip |
Fix regression in HTML handling (telegram). Closes #734
* Revert back to blackfriday v1
* Add testing
Diffstat (limited to 'vendor/github.com/russross/blackfriday/esc.go')
-rw-r--r-- | vendor/github.com/russross/blackfriday/esc.go | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/vendor/github.com/russross/blackfriday/esc.go b/vendor/github.com/russross/blackfriday/esc.go deleted file mode 100644 index 6385f27c..00000000 --- a/vendor/github.com/russross/blackfriday/esc.go +++ /dev/null @@ -1,34 +0,0 @@ -package blackfriday - -import ( - "html" - "io" -) - -var htmlEscaper = [256][]byte{ - '&': []byte("&"), - '<': []byte("<"), - '>': []byte(">"), - '"': []byte("""), -} - -func escapeHTML(w io.Writer, s []byte) { - var start, end int - for end < len(s) { - escSeq := htmlEscaper[s[end]] - if escSeq != nil { - w.Write(s[start:end]) - w.Write(escSeq) - start = end + 1 - } - end++ - } - if start < len(s) && end <= len(s) { - w.Write(s[start:end]) - } -} - -func escLink(w io.Writer, text []byte) { - unesc := html.UnescapeString(string(text)) - escapeHTML(w, []byte(unesc)) -} |