commit f45555ec8d58a2227422d95ba70db84b2334d3d1
parent c4465ab2e813e4082db0ad45ae4c6032580d136e
Author: Peter Kosyh <p.kosyh@gmail.com>
Date: Tue, 8 Sep 2020 18:10:00 +0100
base64 and pre fix
Diffstat:
1 file changed, 12 insertions(+), 0 deletions(-)
diff --git a/ii-node/web.go b/ii-node/web.go
@@ -166,7 +166,19 @@ func www_base64(ctx *WebContext, w http.ResponseWriter, r *http.Request) error {
start := false
b64 := ""
fname := ""
+ pre := false
for _, v := range lines {
+ if !start && strings.Trim(v, " ") == "====" {
+ if !pre {
+ pre = true
+ continue
+ }
+ pre = false
+ continue
+ }
+ if pre {
+ continue
+ }
if !start && !strings.HasPrefix(v, "@base64:") {
continue
}