Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newlines not properly rendered on webpage #198

Open
TomCasavant opened this issue Jul 9, 2024 · 0 comments
Open

Newlines not properly rendered on webpage #198

TomCasavant opened this issue Jul 9, 2024 · 0 comments

Comments

@TomCasavant
Copy link
Contributor

TomCasavant commented Jul 9, 2024

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:

postmarks/server.js

Lines 59 to 63 in 58d1ca1

htmlize(text) {
// uh-oh. ohhhh no.
const returnText = escapeHTML(text);
return returnText?.replace('\n', '<br/>');
},

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant