chore: filter out newlines in guestbook entries; we'll see how this one looks
This commit is contained in:
parent
99d80f56b7
commit
51e33844b1
1 changed files with 1 additions and 1 deletions
|
|
@ -59,7 +59,7 @@ const urls = [
|
|||
<pre class="guestbook-entries" set:html={guestbookEntries.map((e, i) => {
|
||||
const prefix = i === 0 ? labelPrefix(SECTIONS.guestbook, `?just=${SECTIONS.guestbook}`) : blankPrefix;
|
||||
const nameHtml = e.url ? `<a href="${e.url}"><b>${e.name}</b></a>` : `<b>${e.name}</b>`;
|
||||
return `<span class="guestbook-entry" style="padding-left: ${labelWidth + 12}ch; text-indent: -${labelWidth + 12}ch;">${prefix}<span class="muted">${formatDate(e.createdAt)}</span> ${nameHtml} ${e.message}</span>`;
|
||||
return `<span class="guestbook-entry" style="padding-left: ${labelWidth + 12}ch; text-indent: -${labelWidth + 12}ch;">${prefix}<span class="muted">${formatDate(e.createdAt)}</span> ${nameHtml} ${e.message.replace(/\n/g, ' ')}</span>`;
|
||||
}).join('')} />
|
||||
<form id="guestbook-form" class="guestbook-form" style={`margin-left: ${labelWidth + 12}ch`}>
|
||||
<input type="text" name="name" placeholder="name" required maxlength="100" /><br />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue