Fix query string handling

This commit is contained in:
2021-02-27 20:55:41 +01:00
parent 6852a6e645
commit 88c114c5cc
3 changed files with 4 additions and 3 deletions
+1
View File
@@ -186,6 +186,7 @@ def node(node,user_list=[]):
pulling_nodes=n.pulling_nodes(),
pushing_nodes=n.pushing_nodes(),
q=n.wikilink.replace('-', '%20'),
qstr=n.wikilink.replace('-', ' '),
# disabled a bit superstitiously due to [[heisenbug]] after I added this everywhere :).
# sorry for the fuzzy thinking but I'm short on time and want to get things done.
# (...famous last words).
+1 -1
View File
@@ -47,7 +47,7 @@
| <a href="/nodes">nodes</a>
| <a href="/users">@</a>
| <a href="/latest">Δ</a>
| <form action="/exec" method="get" style="display: inline;"><a href="/node/agora-cli">exec</a>: <input type="text" value="{{node}}" name="q"></form>
| <form action="/exec" method="get" style="display: inline;"><a href="/node/agora-cli">exec</a>: <input type="text" value="{{qstr}}" name="q"></form>
| <a href="#" style="text-decoration: none;" class="theme-toggle">🌙</a>
<!-- doesn't fit on mobile right now.
| <a href="/node/agora-help" style="text-decoration: none;" class="help-button">️</a>
+2 -2
View File
@@ -17,7 +17,7 @@
<div class="search">
<div class="search-flex">
<div class="search-internet">
<span class="search-internet-header">Search for '{{q}}' around the web</span> <br />
<span class="search-internet-header">Search for '{{qstr}}' around the web</span> <br />
<a href="https://www.google.com/search?q={{q}}">Google</a> <br />
<a href="https://www.duckduckgo.com/{{q}}">DuckDuckGo</a> <br />
<a href="https://en.wikipedia.org/wiki/Special:Search/{{q}}">Wikipedia</a> <br />
@@ -30,7 +30,7 @@
</div>
<div class="search-agora">
<span class="search-agora-header">Search for '{{q}}' in the Agora</span> <br />
<span class="search-agora-header">Search for '{{qstr}}' in the Agora</span> <br />
{% if search %}
{% for subnode in search %}
<a href="/@{{subnode.user}}/{{subnode.wikilink}}">@{{subnode.user}}/{{subnode.wikilink}}</a><br />