aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFChannel <>2021-07-25 16:00:25 -0700
committerFChannel <>2021-07-25 16:00:25 -0700
commit6846150cb48d080112981633d6dddabef5ce4439 (patch)
tree78bc577d75955e7fcd207fc35db68a6ab15b73e6
parent6c3de825cb50ebcf4c464a742b5480414b8173c4 (diff)
fixed bug with escaping html less than symbol for parsing content
-rw-r--r--client.go4
-rw-r--r--static/npost.html2
-rw-r--r--static/posts.html2
3 files changed, 5 insertions, 3 deletions
diff --git a/client.go b/client.go
index 03f54fa..930cd6f 100644
--- a/client.go
+++ b/client.go
@@ -714,8 +714,10 @@ func ParseAttachment(obj ObjectBase, catalog bool) template.HTML {
}
func ParseContent(db *sql.DB, board Actor, op string, content string, thread ObjectBase) template.HTML {
+
+ nContent := strings.ReplaceAll(content, `<`, "&lt;")
- nContent := ParseLinkComments(db, board, op, content, thread)
+ nContent = ParseLinkComments(db, board, op, nContent, thread)
nContent = ParseCommentQuotes(nContent)
diff --git a/static/npost.html b/static/npost.html
index 3df4090..419a1a9 100644
--- a/static/npost.html
+++ b/static/npost.html
@@ -17,7 +17,6 @@
{{ end }}
<script src="/static/js/posts.js"></script>
-<script src="/static/js/timer.js"></script>
{{ end }}
{{ define "content" }}
@@ -52,6 +51,7 @@
{{ define "script" }}
<script src="/static/js/footerscript.js"></script>
+<script src="/static/js/timer.js"></script>
<script>
viewLink("{{ .Board.Name }}", "{{ .Board.Actor.Id }}")
</script>
diff --git a/static/posts.html b/static/posts.html
index 5810348..17421af 100644
--- a/static/posts.html
+++ b/static/posts.html
@@ -54,7 +54,7 @@
{{ end }}
{{ end }}
{{ range $replies.OrderedItems }}
- <div id="{{ short $board.Actor.Outbox .Id }}">
+ <div id="{{ .Id }}">
<div style="display: inline-block; overflow: auto;">
<div style="float: left; display: block; margin-right: 5px;">>></div>
<div class="post" style="overflow: auto; padding: 5px; margin-bottom: 2px;">