frontend: remove unnecessary URL escapes

This commit is contained in:
Lan Tian 2021-02-27 15:24:21 +08:00
parent 1c3d9ec594
commit f6ddc5761b
No known key found for this signature in database
GPG Key ID: 3D2E9DC81E5791C7
2 changed files with 6 additions and 6 deletions

View File

@ -29,12 +29,12 @@
<ul class="navbar-nav mr-auto"> <ul class="navbar-nav mr-auto">
<li class="nav-item"> <li class="nav-item">
<a class="nav-link{{ if .AllServersLinkActive }} active{{ end }}" <a class="nav-link{{ if .AllServersLinkActive }} active{{ end }}"
href="/{{ urlquery $option }}/{{ urlquery .AllServersURL }}/{{ urlquery $target }}"> All Servers </a> href="/{{ $option }}/{{ .AllServersURL }}/{{ $target }}"> All Servers </a>
</li> </li>
{{ range $k, $v := .Servers }} {{ range $k, $v := .Servers }}
<li class="nav-item"> <li class="nav-item">
<a class="nav-link{{ if eq $server $v }} active{{ end }}" <a class="nav-link{{ if eq $server $v }} active{{ end }}"
href="/{{ urlquery $option }}/{{ urlquery $v }}/{{ urlquery $target }}">{{ html $v }}</a> href="/{{ $option }}/{{ $v }}/{{ $target }}">{{ html $v }}</a>
</li> </li>
{{ end }} {{ end }}
</ul> </ul>
@ -67,9 +67,9 @@
<script> <script>
function goto() { function goto() {
let action = encodeURIComponent($('[name="action"]').val()); let action = $('[name="action"]').val();
let server = encodeURIComponent($('[name="server"]').val()); let server = $('[name="server"]').val();
let target = encodeURIComponent($('[name="target"]').val()); let target = $('[name="target"]').val();
let url = ""; let url = "";
if (action == "whois") { if (action == "whois") {

View File

@ -9,7 +9,7 @@
<tbody> <tbody>
{{ range .Rows }} {{ range .Rows }}
<tr class="table-{{ .MappedState }}"> <tr class="table-{{ .MappedState }}">
<td><a href="/detail/{{ urlquery $ServerName }}/{{ urlquery .Name }}">{{ html .Name }}</a></td> <td><a href="/detail/{{ $ServerName }}/{{ urlquery .Name }}">{{ html .Name }}</a></td>
<td>{{ html .Proto }}</td> <td>{{ html .Proto }}</td>
<td>{{ html .Table }}</td> <td>{{ html .Table }}</td>
<td>{{ html .State }}</td> <td>{{ html .State }}</td>