Fix form on webkit

This commit is contained in:
Daniella 2022-01-30 17:45:45 +01:00
parent cea14f3142
commit 15d80571df

View file

@ -125,17 +125,17 @@
if(postid != -1) if(postid != -1)
ret += `<a href="/post/${postid}">[Nevermind]</a>` ret += `<a href="/post/${postid}">[Nevermind]</a>`
ret += ret +=
`</div></div><post><div class="content"><form method="post"><label>` + `</div></div><post><div class="content"><form method="post">` +
`<h3>` + `<h3>` +
`<input type="username" name="name" ${fake ? `value="${post.comments[post.comments.length - 1].author.replaceAll("&", "&amp;").replaceAll("\"", "&quot;")}"` : 'value="Anonymous"'} required>: ` + `<input type="username" name="name" ${fake ? `value="${post.comments[post.comments.length - 1].author.replaceAll("&", "&amp;").replaceAll("\"", "&quot;")}"` : 'value="Anonymous"'} required>: ` +
`<input type="text" name="title" placeholder="Title" ${fake ? `value="${post.comments[post.comments.length - 1].title.replaceAll("&", "&amp;").replaceAll("\"", "&quot;")}"` : ''} required>` + `<input type="" name="title" placeholder="Title" ${fake ? `value="${post.comments[post.comments.length - 1].title.replaceAll("&", "&amp;").replaceAll("\"", "&quot;")}"` : ''} required>` +
`</h3>` + `</h3>` +
`<textarea name="content" placeholder="So basically, ..." required>` + `<textarea name="content" placeholder="So basically, ..." required>` +
(fake ? post.comments[post.comments.length - 1].content.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;") : '') + (fake ? post.comments[post.comments.length - 1].content.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;") : '') +
`</textarea><br/><br/>` + `</textarea><br/><br/>` +
`<button type="submit" name="fake" value="no">Submit</button> ` + `<button type="submit" name="fake" value="no">Submit</button> ` +
`<button type="submit" name="fake" value="yes">Preview</button>` + `<button type="submit" name="fake" value="yes">Preview</button>` +
`</label></form></div></post><div>` `</form></div></post><div>`
} }
else if (!fake) else if (!fake)
ret += `<a href="/comment/${postid}/${id}">[Reply]</a> </div>` ret += `<a href="/comment/${postid}/${id}">[Reply]</a> </div>`