Files
blogger-nodejs/views/posts/timeline.ejs
DeaDvey 9b5d3f3f73 Fixed issue relating to showdownjs not escaping html tags by porting to
markdown-it, also introduced a new function: func.render_md
2025-08-27 15:09:57 +01:00

25 lines
760 B
Plaintext

<h3>
<%= post.title %>
</h3>
<%- func.render_md(post.content) %><br/>
<a href="/post/<%- index %>"><%= locale.permalink %></a><br/>
<i>
<%= locale.written_by %> <a href="/user/<%= user.username %>"><%= user.username %></a><br/>
</i>
<br/>
<!-- Comment form -->
<form method="POST" action="/submit_comment">
<input type="hidden" name="post_index" value="<%= index %>">
<label><%= locale.username %>:</label><br/><input name="name"><br/><br/>
<label><%= locale.comment %>:</label><br/><textarea name="content"></textarea><br/>
<button type="submit"><%= locale.submit %></button>
</form>
<% comments[index].forEach((comment, index) => { %>
<%- include('../partials/comment', {comment: comment}) %>
<% }) %>
<%- config.seperator %>