Skip to content

Commit 407f602

Browse files
committed
feat: sanitize guestbook text
1 parent a1d68e4 commit 407f602

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎.github/workflows/guestbook.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
const result = await github.graphql(query, variables)
4343
const renderComments = (comments) => {
4444
return comments.reduce((prev, curr) => {
45+
const sanitizedText = curr.bodyText.replace("\n", "<br />");
4546
return `${prev}|[![${curr.author.login}](${curr.author.avatarUrl})${curr.author.login}](${curr.author.url})|${new Date(curr.updatedAt).toLocaleString()}|${curr.bodyText}|\n`;
4647
}, "| Name | Date | Message |\n|---|---|---|\n");
4748
};

0 commit comments

Comments
 (0)