Fixed issue relating to showdownjs not escaping html tags by porting to

markdown-it, also introduced a new function: func.render_md
This commit is contained in:
2025-08-27 15:09:57 +01:00
parent 5f07db1e15
commit 9b5d3f3f73
8 changed files with 17 additions and 31 deletions

View File

@@ -1,7 +1,7 @@
<h1>
<%= user.prettyname %>
</h1>
<p><%- converter.makeHtml(user.description) %></p>
<p><%- func.render_md(user.description) %></p>
<a href="<%= config.edit_account_base_url %>/<%= userID %>"><%= locale.edit_account %></a><br/>
<a href="/user/<%= user.username %>/rss"><%= locale.rss_feed %></a><br/>
<a href="/user/<%= user.username %>/atom"><%= locale.atom_feed %></a>

View File

@@ -1,7 +1,7 @@
<h1>
<%= post.title %>
</h1>
<%- converter.makeHtml(post.content) %><br/>
<%- func.render_md(post.content) %><br/>
<i>
<%= locale.written_by %> <a href="/user/<%= user.username %>"><%= user.username %></a><br/>
</i>

View File

@@ -1,7 +1,7 @@
<h3>
<%= post.title %>
</h3>
<%- converter.makeHtml(post.content) %><br/>
<%- func.render_md(post.content) %><br/>
<a href="/post/<%- postID %>"><%= locale.permalink %></a><br/>
<%- func.hyperlink_tags(post.tags) %>
<br/>

View File

@@ -1,7 +1,7 @@
<h3>
<%= post.title %>
</h3>
<%- converter.makeHtml(post.content) %><br/>
<%- 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/>

View File

@@ -1,7 +1,7 @@
<h3>
<%= post.title %>
</h3>
<%- converter.makeHtml(post.content) %><br/>
<%- func.render_md(post.content) %><br/>
<a href="/post/<%- index %>"><%= locale.permalink %></a><br/>
<br/>