Use safeJS instead of safeHTML

This commit is contained in:
Marcel 2021-11-13 16:23:50 +01:00 committed by GitHub
parent f8cce2189c
commit d63c44b9e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,10 +20,10 @@
<script> <script>
initComments({ initComments({
node: document.getElementById("comment-section"), node: document.getElementById("comment-section"),
defaultHomeserverUrl: "{{ .defaultHomeserverUrl | safeHTML }}", defaultHomeserverUrl: "{{ .defaultHomeserverUrl | safeJS }}",
serverName: "{{ .serverName }}", serverName: "{{ .serverName }}",
siteName: "{{ .siteName }}", siteName: "{{ .siteName }}",
commentSectionId: "{{ $.File.UniqueID }}" commentSectionId: "{{ $.File.UniqueID }}"
}) })
</script> </script>
{{- end -}} {{- end -}}