ckolderup / postmarks

a single-user bookmarking website designed to live on the Fediverse
https://postmarks.glitch.me
MIT License
459 stars 38 forks source link

Newlines not properly rendered on webpage #198

Open TomCasavant opened 2 weeks ago

TomCasavant commented 2 weeks ago

Basically on the bookmark page it combines all the text into a large paragaph (but the activityPub post is still properly creating the newlines)

I think the issue is here: https://github.com/ckolderup/postmarks/blob/58d1ca1f052870d750193ff23694ef57779af37b/server.js#L59-L63

I changed it to return returnText?.replace(/\n/g, '<br/>'); to replace all newlines with the <br /> and that seems to have fixed it but I haven't looked at escapeHTML (I would think it would parse the newlines properly but I guess not)