The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
fixes #426 . added a new packege he to decode the html string
VishalMCFf01d0ea2d0cf
diff --git a/apps/web/package.json b/apps/web/package.jsonindex 0d2101d7b6..64dd9cf9e2 100644--- a/apps/web/package.json+++ b/apps/web/package.json@@ -48,6 +48,7 @@"framer-motion": "^10.12.12","fuse.js": "^6.6.2","github-slugger": "^2.0.0",+ "he": "^1.2.0","html-escaper": "^3.0.3","js-cookie": "^3.0.5","lucide-react": "^0.269.0",@@ -88,6 +89,7 @@"devDependencies": {"@trivago/prettier-plugin-sort-imports": "^4.0.0","@types/dotenv-flow": "^3.3.2",+ "@types/he": "^1.2.3","@types/html-escaper": "^3.0.0","@types/ms": "^0.7.31","@types/node": "18.11.9",diff --git a/apps/web/pages/api/edge/metatags.ts b/apps/web/pages/api/edge/metatags.tsindex 573c672db9..dc90b1faf5 100644--- a/apps/web/pages/api/edge/metatags.ts+++ b/apps/web/pages/api/edge/metatags.ts@@ -4,6 +4,7 @@ import { ipAddress } from "@vercel/edge";import { getToken } from "next-auth/jwt";import { NextFetchEvent, NextRequest } from "next/server";import { parse } from "node-html-parser";+import he from "he";export const config = {runtime: "edge",@@ -123,7 +124,7 @@ export const getMetaTags = async (url: string, ev?: NextFetchEvent) => {for (let k in metaTags) {let { property, content } = metaTags[k];- property && (object[property] = content);+ property && (object[property] = he.decode(content));}for (let m in linkTags) {diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex a9136ff1ea..292b46cf72 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -142,6 +142,9 @@ importers:github-slugger:specifier: ^2.0.0version: 2.0.0+ he:+ specifier: ^1.2.0+ version: 1.2.0html-escaper:specifier: ^3.0.3version: 3.0.3@@ -257,6 +260,9 @@ importers:'@types/dotenv-flow':specifier: ^3.3.2version: 3.3.2+ '@types/he':+ specifier: ^1.2.3+ version: 1.2.3'@types/html-escaper':specifier: ^3.0.0version: 3.0.0@@ -450,7 +456,7 @@ importers:version: link:../tsconfigtsup:specifier: ^6.1.3- version: 6.1.3([email protected])+ version: 6.1.3([email protected])([email protected])typescript:specifier: ^5.1.6version: 5.1.6@@ -6825,6 +6831,10 @@ packages:'@types/unist': 2.0.8dev: false+ /@types/[email protected]:+ resolution: {integrity: sha512-q67/qwlxblDzEDvzHhVkwc1gzVWxaNxeyHUBF4xElrvjL11O+Ytze+1fGpBHlr/H9myiBUaUXNnNPmBHxxfAcA==}+ dev: true+/@types/[email protected]:resolution: {integrity: sha512-OcJcvP3Yk8mjYwf/IdXZtTE1tb/u0WF0qa29ER07ZHCYUBZXSN29Z1mBS+/96+kNMGTFUAbSz9X+pHmHpZrTCw==}dev: true@@ -12614,6 +12624,7 @@ packages:lilconfig: 2.1.0postcss: 8.4.21yaml: 1.10.2+ dev: falseresolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==}@@ -12701,6 +12712,7 @@ packages:nanoid: 3.3.6picocolors: 1.0.0source-map-js: 1.0.2+ dev: falseresolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==}@@ -14534,42 +14546,6 @@ packages:- ts-nodedev: true- resolution: {integrity: sha512-eRpBnbfpDFng+EJNTQ90N7QAf4HAGGC7O3buHIjroKWK7D1ibk9/YnR/3cS8HsMU5T+6Oi+cnF+yU5WmCnB//Q==}- engines: {node: '>=14'}- hasBin: true- peerDependencies:- '@swc/core': ^1- postcss: ^8.4.12- typescript: ^4.1.0- peerDependenciesMeta:- '@swc/core':- optional: true- postcss:- optional: true- typescript:- optional: true- dependencies:- bundle-require: 3.1.2([email protected])- cac: 6.7.14- chokidar: 3.5.3- debug: 4.3.4- esbuild: 0.14.54- execa: 5.1.1- globby: 11.1.0- joycon: 3.1.1- postcss-load-config: 3.1.4([email protected])- resolve-from: 5.0.0- rollup: 2.79.1- source-map: 0.8.0-beta.0- sucrase: 3.34.0- tree-kill: 1.2.2- typescript: 5.1.6- transitivePeerDependencies:- - supports-color- - ts-node- dev: true-resolution: {integrity: sha512-xHtFaKtHxM9LOklMmJdI3BEnQq/D5F73Of2E1GDrITi9sgoVkvIsrQUTY1G8FlmGtA+awCI4EBlTRRYxkL2sRg==}hasBin: true