refactor all the replace stuff into a single method
This commit is contained in:
parent
8e3dccd637
commit
2cf6ef7c6f
4 changed files with 12 additions and 8 deletions
|
@ -10,14 +10,14 @@
|
|||
{% if board.boards |length > 0 %}
|
||||
<ul>
|
||||
{% for board in board.boards %}
|
||||
<li><a href={{ "../board/" + board.title.replace('/', '_').replace(' ', '_').replace('?', '') + ".html" }}>{{ board.title }}</a></li>
|
||||
<li><a href={{ "../board/" + board.title |url_replacer + ".html" }}>{{ board.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<hr>
|
||||
{% endif %}
|
||||
<ul>
|
||||
{% for thread in board.threads %}
|
||||
<li><a href={{ "thread/" + thread.title.replace('/', '_').replace(' ', '_').replace('?', '') + ".html" }}>{{ thread.title }}</a></li>
|
||||
<li><a href={{ "thread/" + thread.title |url_replacer + ".html" }}>{{ thread.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</body>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<body>
|
||||
<h1>{{ thread.title }}</h1>
|
||||
{% for post in thread.posts %}
|
||||
<h3><a href={{ "../../user/" + post.user.name.replace('/', '_').replace(' ', '_').replace('?', '') + ".html" }}>{{ post.user.name }}</a> - {{ post.timestamp | fromunixtime }}</h3>
|
||||
<h3><a href={{ "../../user/" + post.user.name |url_replacer + ".html" }}>{{ post.user.name }}</a> - {{ post.timestamp | fromunixtime }}</h3>
|
||||
<p>{{ post.message | tohtml }}</p>
|
||||
{% for attachment in post.attachments %}
|
||||
--<br>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<hr>
|
||||
<ul>
|
||||
{% for user in users %}
|
||||
<li><a href={{ "user/" + user.name.replace('/', '_').replace(' ', '_').replace('?', '') + ".html" }}>{{ user.name }}</a></li>
|
||||
<li><a href={{ "user/" + user.name |url_replacer + ".html" }}>{{ user.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue