diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-09-19 10:36:25 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-09-19 10:36:25 -0300 |
commit | b85404e0b438a0c014b26b9cbfd12475cea6cb33 (patch) | |
tree | 9ffaecebf241a58025e2989fd4403d7c26a04591 | |
parent | fdd8f355bfe0992fc340f800297df524276b1946 (diff) |
content: linkThing: sanitize name before passing to linkTemplate
-rw-r--r-- | src/content/dependencies/linkThing.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/content/dependencies/linkThing.js b/src/content/dependencies/linkThing.js index 643bf4b1..e661ca7c 100644 --- a/src/content/dependencies/linkThing.js +++ b/src/content/dependencies/linkThing.js @@ -1,6 +1,6 @@ export default { contentDependencies: ['linkTemplate'], - extraDependencies: ['html'], + extraDependencies: ['html', 'language'], relations(relation) { return { @@ -41,7 +41,7 @@ export default { hash: {type: 'string'}, }, - generate(data, relations, slots, {html}) { + generate(data, relations, slots, {html, language}) { const path = [data.pathKey, data.directory]; const name = @@ -51,7 +51,7 @@ export default { const content = (html.isBlank(slots.content) - ? name + ? language.sanitize(name) : slots.content); let color = null; |