home » zplus/freepost.git
Author zPlus <-> 2017-03-27 15:10:05
Committer zPlus <-> 2017-03-27 15:10:05
Commit 3606d68 (patch)
Tree 9c35f3a
Parent(s)

Fix #46 Validation problems for users that have a space in their username


commits diff: d94a6d2..3606d68
8 files changed, 8 insertions, 8 deletionsdownload


Diffstat
-rw-r--r-- template/comment.twig 2
-rw-r--r-- template/edit_comment.twig 2
-rw-r--r-- template/edit_post.twig 2
-rw-r--r-- template/index.twig 2
-rw-r--r-- template/post.twig 2
-rw-r--r-- template/reply.twig 2
-rw-r--r-- template/search.twig 2
-rw-r--r-- template/user_replies.twig 2

Diff options
View
Side
Whitespace
Context lines
Inter-hunk lines
+1/-1 M   template/comment.twig
index 580f0bb..4914c26
old size: 2K - new size: 2K
@@ -8,7 +8,7 @@
8 8 <div class="info">
9 9 {# Username #}
10 10 <span class="username {{ post.userId == comment.userId ? 'op' }}">
11 - <a href="{{ ('user/' ~ comment.username)|docroot }}">{{ comment.username }}</a>
11 + <a href="{{ ('user/' ~ comment.username|url_encode)|docroot }}">{{ comment.username }}</a>
12 12 </span>
13 13
14 14 {%

+1/-1 M   template/edit_comment.twig
index ba61dfb..51edb45
old size: 745B - new size: 815B
@@ -6,7 +6,7 @@
6 6 </h3>
7 7
8 8 <div class="info">
9 - by {{ item.data.username }}
9 + by <a href="{{ ('user/' ~ item.data.username|url_encode)|docroot }}">{{ item.data.username }}</a>
10 10 <em>{{ item.data.created|ago }}</em>
11 11 </div>
12 12

+1/-1 M   template/edit_post.twig
index 279d5da..8ff85a2
old size: 966B - new size: 1K
@@ -9,7 +9,7 @@
9 9 <input type="text" name="title" class="form-control" value="{{ item.data.title }}" />
10 10 </div>
11 11 <div class="info">
12 - by {{ item.data.username }}
12 + by <a href="{{ ('user/' ~ item.data.username|url_encode)|docroot }}">{{ item.data.username }}</a>
13 13 <em>{{ item.data.created|ago }}</em>
14 14 </div>
15 15

+1/-1 M   template/index.twig
index 4c6694d..8bcdb59
old size: 2K - new size: 2K
@@ -54,7 +54,7 @@ _\(/_ .:.*_\/_* : /\ :
54 54 %}
55 55
56 56 <em><a href="post/{{ post.hashId }}">{{ post.created|ago }}</a></em>
57 - by <a href="{{ ('user/' ~ post.username)|docroot }}">{{ post.username }}</a>
57 + by <a href="{{ ('user/' ~ post.username|url_encode)|docroot }}">{{ post.username }}</a>
58 58
59 59 <a href="post/{{ post.hashId }}#comments">{{ post.commentsCount ? post.commentsCount }} comments</a>
60 60 </div>

+1/-1 M   template/post.twig
index 6376ca2..cad9509
old size: 2K - new size: 2K
@@ -23,7 +23,7 @@
23 23 } only
24 24 %}
25 25
26 - by <a href="{{ ('user/' ~ post.username)|docroot }}">{{ post.username }}</a> <em>{{ post.created|ago }}</em>
26 + by <a href="{{ ('user/' ~ post.username|url_encode)|docroot }}">{{ post.username }}</a> <em>{{ post.created|ago }}</em>
27 27 — {{ post.vote }} votes, <a href="#comments">{{ post.commentsCount }} comments</a>
28 28
29 29 {% if user and post.userId == user.id %}

+1/-1 M   template/reply.twig
index 7ff0e0e..5cd3bcf
old size: 882B - new size: 950B
@@ -1,7 +1,7 @@
1 1 {% include 'header.twig' %}
2 2
3 3 <div class="reply">
4 - <h3>Reply to <em>{{ comment.username }}</em></h3>
4 + <h3>Reply to <em><a href="{{ ('user/' ~ comment.username|url_encode)|docroot }}">{{ comment.username }}</a></em></h3>
5 5
6 6 <div class="info">
7 7 posted <em><a href="{{ 'post/'|docroot ~ comment.postHashId }}#comment-{{ comment.hashId }}">{{ comment.created|ago }}</a></em>

+1/-1 M   template/search.twig
index 38184cd..99ac99c
old size: 1K - new size: 1K
@@ -19,7 +19,7 @@
19 19
20 20 <div class="info">
21 21 <em><a href="post/{{ post.hashId }}">{{ post.created|ago }}</a></em>
22 - by <a href="{{ ('user/' ~ post.username)|docroot }}">{{ post.username }}</a>
22 + by <a href="{{ ('user/' ~ post.username|url_encode)|docroot }}">{{ post.username }}</a>
23 23
24 24 <a href="post/{{ post.hashId }}#comments">{{ post.commentsCount ? post.commentsCount }} comments</a>
25 25 </div>

+1/-1 M   template/user_replies.twig
index 43269ee..71a252a
old size: 736B - new size: 747B
@@ -12,7 +12,7 @@
12 12 <a href="../post/{{ comment.postHashId }}#comment-{{ comment.hashId }}">read</a>
13 13 <a href="../reply?comment={{ comment.hashId }}">reply</a>
14 14
15 - by <a href="../user/{{ comment.username }}">{{ comment.username }}</a> <em>{{ comment.created|ago }}</em> on <a href="../post/{{ comment.postHashId }}">{{ comment.postTitle }}</a>
15 + by <a href="../user/{{ comment.username|url_encode }}">{{ comment.username }}</a> <em>{{ comment.created|ago }}</em> on <a href="../post/{{ comment.postHashId }}">{{ comment.postTitle }}</a>
16 16 </div>
17 17 </div>
18 18