Skip to content

Commit

Permalink
fix: don't overwrite content value; update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisburnell committed Aug 20, 2023
1 parent 8565e33 commit 6aca521
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions eleventy-cache-webmentions.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ const getWebmentions = async (options, url, allowedTypes = {}) => {
const html = getContent(entry)

if (html.length) {
entry.content = sanitizeHTML(html, options.allowedHTML)
entry.contentSanitized = sanitizeHTML(html, options.allowedHTML)
if (html.length > options.maximumHtmlLength) {
entry.content = `${options.maximumHtmlText} <a href="${getSource(entry)}">${getSource(entry)}</a>`
entry.contentSanitized = `${options.maximumHtmlText} <a href="${getSource(entry)}">${getSource(entry)}</a>`
}
}

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@chrisburnell/eleventy-cache-webmentions",
"version": "1.2.3",
"version": "1.2.4",
"description": "Fetch and cache webmentions using eleventy-fetch.",
"author": "Chris Burnell <me@chrisburnell.com>",
"license": "MIT",
Expand All @@ -20,12 +20,12 @@
"webmention"
],
"devDependencies": {
"eslint": "^8.45.0"
"eslint": "^8.47.0"
},
"dependencies": {
"@11ty/eleventy-fetch": "^4.0.0",
"lodash": "^4.17.21",
"node-fetch": "^2.6.7",
"node-fetch": "^3.3.2",
"sanitize-html": "^2.11.0"
},
"main": "eleventy-cache-webmentions.js",
Expand Down

0 comments on commit 6aca521

Please sign in to comment.