fix: encode tag for URI (WEB-1)
The tag 'c#' was causing problems since # is a special URI char oops.
This commit is contained in:
parent
f48713c470
commit
a0fd48e6ca
|
@ -41,7 +41,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
<div class="card-footer">
|
||||||
{{#each post.tags}}
|
{{#each post.tags}}
|
||||||
<a href="?tag={{this}}" class="badge text-bg-dark">{{this}}</a>
|
<a href="?tag={{urlEncode this}}" class="badge text-bg-dark">{{this}}</a>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -28,6 +28,8 @@ declare const Prism: any;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Handlebars.registerHelper("urlEncode", encodeURIComponent);
|
||||||
|
|
||||||
function getQueryVariable(variable: string): string {
|
function getQueryVariable(variable: string): string {
|
||||||
const query = window.location.search.substring(1);
|
const query = window.location.search.substring(1);
|
||||||
const vars = query.split("&");
|
const vars = query.split("&");
|
||||||
|
|
Loading…
Reference in New Issue