Skip to content

Commit

Permalink
Merge pull request #79 from AlexSciFier/fix-character-encoding
Browse files Browse the repository at this point in the history
Fix character encoding
  • Loading branch information
AlexSciFier authored Oct 14, 2023
2 parents 434ad84 + 3075cc5 commit ba39272
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "neonlink-frontend",
"version": "1.4.10",
"version": "1.4.11",
"private": true,
"dependencies": {
"@dnd-kit/core": "^6.0.8",
Expand Down
2 changes: 1 addition & 1 deletion server/routes/api/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default async function (fastify, opts) {
return { title: "", desc: "", icon: "" };
}
let contentType = res.headers["content-type"];
let matches = contentType.match(/charset=\s*"?(.[^\"]+)"?$/gim);
let matches = contentType.match(/charset=\s*"?(.[^\"]+)"?$/i);
let encoding = matches?.[1] || "utf-8";
let resData = await res.data;
let html = new TextDecoder(encoding.toLowerCase()).decode(resData);
Expand Down

0 comments on commit ba39272

Please sign in to comment.