commit 4ccd5c71fdb810f0dc5b2678b6ae2104c440df64
parent c308e2ac9712b5d1813dc6be30dcd912b7f09e8a
Author: Peter Kosyh <p.kosyh@gmail.com>
Date: Fri, 4 Sep 2020 21:15:36 +0300
style
Diffstat:
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/ii-node/tpl/topic.tpl b/ii-node/tpl/topic.tpl
@@ -8,7 +8,7 @@
{{else}}
<div class="msg">
{{end}}
-<a class="msgid" href="/{{.MsgId}}#{{.MsgId}}">#</a><span class="subj"><a href="/{{. | repto}}#{{. | repto}}">{{.Subj}}</a></span><br>
+<a class="msgid" href="/{{.MsgId}}#{{.MsgId}}">#</a><span class="subj"> <a href="/{{. | repto}}#{{. | repto}}">{{.Subj}}</a></span><br>
<span class="info">{{.From}}({{.Addr}}) — {{.To}}<br>{{.Date | fdate}}</span><br>
<div class="text">
<br>
diff --git a/ii-node/web.go b/ii-node/web.go
@@ -382,7 +382,6 @@ func www_reply(user *ii.User, www WWW, w http.ResponseWriter, r *http.Request, i
ii.Error.Printf("Error while store reply msg %s: %s", m.MsgId, err)
return err
}
- // topic := m.MsgId
http.Redirect(w, r, "/" + m.MsgId + "#" + m.MsgId, http.StatusSeeOther)
return nil
}
@@ -396,7 +395,7 @@ func str_esc(l string) string {
return l
}
-var quoteRegex = regexp.MustCompile("^[^>]*>")
+var quoteRegex = regexp.MustCompile("^[^ >]*>")
var urlRegex = regexp.MustCompile(`(http|ftp|https)://[^ <>"]+`)
func msg_format(txt string) template.HTML {
diff --git a/ii/db.go b/ii/db.go
@@ -600,7 +600,7 @@ type UDB struct {
}
func IsUsername(u string) bool {
- return !strings.ContainsAny(u, ":\n\r\t") && len(u) <= 16
+ return !strings.ContainsAny(u, ":\n \r\t") && len(u) <= 16
}
func MakeSecret(msg string) string {