diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-08-20 22:06:17 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-08-20 22:07:50 -0300 |
commit | 93fd751aeb3a9c0b60889db0073e7907c87f90fe (patch) | |
tree | dbf9efedc019a0ce27d37eb40e92922efee2e3f7 /test | |
parent | 040e0d3a1d3890f7c45e2839ca949d353a160efc (diff) |
content: linkTemplate: strip <a> tags from content
Diffstat (limited to 'test')
-rw-r--r-- | test/snapshot/linkTemplate.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/snapshot/linkTemplate.js b/test/snapshot/linkTemplate.js index bdb91216..7351a102 100644 --- a/test/snapshot/linkTemplate.js +++ b/test/snapshot/linkTemplate.js @@ -1,4 +1,5 @@ import t from 'tap'; +import * as html from '#html'; import {testContentFunctions} from '#test-lib'; testContentFunctions(t, 'linkTemplate (snapshot)', async (t, evaluate) => { @@ -50,4 +51,18 @@ testContentFunctions(t, 'linkTemplate (snapshot)', async (t, evaluate) => { name: 'linkTemplate', slots: {href: 'banana'}, }); + + evaluate.snapshot('link in content', { + name: 'linkTemplate', + slots: { + hash: 'the-more-ye-know', + content: [ + `Oh geez oh heck`, + html.tag('a', {href: 'dogs'}, `There's a link in here!!`), + `But here's <b>a normal tag.</b>`, + html.tag('div', `Gotta keep them normal tags.`), + html.tag('div', `But not... <a href="#">NESTED LINKS, OOO.</a>`), + ], + }, + }); }); |