Skip to content

Commit

Permalink
Test: add "Query string" link showing its opening tag text
Browse files Browse the repository at this point in the history
  • Loading branch information
dieulot committed Mar 6, 2023
1 parent dcbaf39 commit 4cd9838
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
background: hsla(0, 0%, 0%, .25);
}

a small {
font-size: .75em;
opacity: .75;
}

form {
background: hsla(0, 0%, 100%, .25);
border: 1px solid hsla(0, 0%, 0%, .15);
Expand Down
4 changes: 4 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ async function requestListener(req, res) {
content += `<a href="${req.url}#anchor" id="anchor"><span>Same-page anchor</span></a>`
content += `<a href="/${page}?${getRandomId()}" data-no-instant><span>Manually blacklisted link</span></a>`
content += `<a href="/${page}?${getRandomId()}"><span>Non-whitelisted link</span></a>`

const openingTag = `<a href="/${page}?${getRandomId()}">`
content += `${openingTag}<span>Query string <small>${openingTag.replace('<', '&lt;').replace('>', '&gt;')}</small></span></a>`

content += `<a href="https://www.google.com/" ${dataInstantAttribute}><span>External link</span></a>`
content += `<a><span>&lt;a&gt; without <code>href</code></span></a>`
content += `<a href="file:///C:/"><span>file: link</span></a>`
Expand Down

0 comments on commit 4cd9838

Please sign in to comment.