Fix prefix links on prefix length page with URL encoding

- Add urlEncode template function to properly encode prefix URLs
- Move prefix_length.html to embedded templates with function map
- Prevents broken links for prefixes containing slashes
This commit is contained in:
2025-07-28 22:00:27 +02:00
parent 7d39bd18bc
commit 9518519208
4 changed files with 178390 additions and 1365 deletions

View File

@@ -93,7 +93,7 @@
<tbody>
{{ range .Prefixes }}
<tr>
<td><a href="/prefix/{{ .Prefix }}" class="prefix-link">{{ .Prefix }}</a></td>
<td><a href="/prefix/{{ .Prefix | urlEncode }}" class="prefix-link">{{ .Prefix }}</a></td>
<td class="age">{{ .Age }}</td>
<td>
<a href="/as/{{ .OriginASN }}" class="as-link">