open-graph-scraper
Advanced tools
Comparing version 6.3.0 to 6.3.1
# Change Log | ||
## 6.3.1 | ||
- Adding a fallback for `charset` using `http-equiv` | ||
- Updating dependencies to fix npm vulnerabilities | ||
## 6.3.0 | ||
@@ -4,0 +9,0 @@ |
@@ -196,2 +196,7 @@ "use strict"; | ||
} | ||
else if (doesElementExist('head > meta[http-equiv="content-type"]', 'content', $)) { | ||
const content = $('head > meta[http-equiv="content-type"]').attr('content'); | ||
const charsetRegEx = /charset=([^()<>@,;:"/[\]?.=\s]*)/i; | ||
ogObject.charset = charsetRegEx.test(content) ? charsetRegEx.exec(content)[1] : 'UTF-8'; | ||
} | ||
else if (body) { | ||
@@ -198,0 +203,0 @@ ogObject.charset = chardet_1.default.detect(Buffer.from(body)) || ''; |
{ | ||
"name": "open-graph-scraper", | ||
"description": "Node.js scraper module for Open Graph and Twitter Card info", | ||
"version": "6.3.0", | ||
"version": "6.3.1", | ||
"license": "MIT", | ||
@@ -30,3 +30,3 @@ "main": "./dist/index.js", | ||
"cheerio": "^1.0.0-rc.12", | ||
"undici": "^5.25.4", | ||
"undici": "^5.26.4", | ||
"validator": "^13.11.0" | ||
@@ -40,10 +40,10 @@ }, | ||
"devDependencies": { | ||
"@snyk/protect": "^1.1230.0", | ||
"@types/mocha": "^10.0.2", | ||
"@snyk/protect": "^1.1236.0", | ||
"@types/mocha": "^10.0.3", | ||
"@types/node": "^18.18.3", | ||
"@types/validator": "^13.11.2", | ||
"@typescript-eslint/eslint-plugin": "^6.7.4", | ||
"@typescript-eslint/parser": "^6.7.4", | ||
"@types/validator": "^13.11.5", | ||
"@typescript-eslint/eslint-plugin": "^6.8.0", | ||
"@typescript-eslint/parser": "^6.8.0", | ||
"chai": "^4.3.10", | ||
"eslint": "^8.50.0", | ||
"eslint": "^8.52.0", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
@@ -56,3 +56,3 @@ "eslint-config-airbnb-typescript": "^17.1.0", | ||
"nyc": "^15.1.0", | ||
"sinon": "^16.0.0", | ||
"sinon": "^17.0.0", | ||
"ts-mocha": "^10.0.0", | ||
@@ -59,0 +59,0 @@ "typescript": "^5.2.2" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
88770
2119
Updatedundici@^5.26.4