diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-12-19 12:11:32 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-12-19 13:25:16 -0400 |
commit | 9bb22cad44ef6a0a055823d77426a72d6f2a8d35 (patch) | |
tree | 2f5480d62e7616ac946f75683f1ca7a3301c889d /src/content/dependencies | |
parent | 5bae11ecd9d828eb2dd4715d8e6a27dcc42a767f (diff) |
content: transformContent: harden for links within templates
Diffstat (limited to 'src/content/dependencies')
-rw-r--r-- | src/content/dependencies/transformContent.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/content/dependencies/transformContent.js b/src/content/dependencies/transformContent.js index 6f1ad0c7..3d9fdd60 100644 --- a/src/content/dependencies/transformContent.js +++ b/src/content/dependencies/transformContent.js @@ -368,7 +368,15 @@ export default { return {type: 'text', data: nodeFromRelations.data}; } - const {link, label, hash} = nodeFromRelations; + // TODO: This is a bit hacky, like the stuff below, + // but since we dressed it up in a utility function + // maybe it's okay... + const link = + html.resolve( + nodeFromRelations.link, + {slots: ['content', 'hash']}); + + const {label, hash} = nodeFromRelations; // These are removed from the typical combined slots({})-style // because we don't want to override slots that were already set |