replacing new lines in summary with html line breaks for outbox

This commit is contained in:
Jeffrey Phillips Freeman 2023-10-09 12:47:15 -04:00
parent 74708eb40c
commit 762abd797c
No known key found for this signature in database
GPG key ID: AD914585C9406B6A

View file

@ -28,7 +28,7 @@
"object": {
"id": "{{ .Permalink }}",
"type": "Note",
"content": "{{.Title}}{{ if .Summary }}<br>{{ .Summary }}{{ end }}<br><a href='{{.Permalink}}'>{{.Permalink}}</a>",
"content": "{{.Title}}{{ if .Summary }}<br>{{ .Summary.replace(/(?:\r\n|\r|\n)/g, '<br>') }}{{ end }}<br><a href='{{.Permalink}}'>{{.Permalink}}</a>",
"url": "{{.Permalink}}",
"attributedTo": "{{ .Site.BaseURL }}{{ site.Params.apUser | lower}}",
"to": "https://www.w3.org/ns/activitystreams#Public",