link-check
Advanced tools
Comparing version 4.5.2 to 4.5.3
# Changes | ||
## Version 4.5.3 | ||
* #76 encode urls to prevent unicode chars to fail | ||
## Version 4.5.2 | ||
@@ -4,0 +8,0 @@ |
@@ -30,3 +30,3 @@ "use strict"; | ||
const options = { | ||
uri: link, | ||
uri: encodeURI(link), | ||
headers: { | ||
@@ -33,0 +33,0 @@ // override 'User-Agent' (some sites return `401` when the user-agent isn't a web browser) |
{ | ||
"name": "link-check", | ||
"version": "4.5.2", | ||
"version": "4.5.3", | ||
"description": "checks whether a hyperlink is alive (200 OK) or dead", | ||
@@ -40,3 +40,3 @@ "main": "index.js", | ||
"jshint": "^2.12.0", | ||
"mocha": "^8.1.3" | ||
"mocha": "^8.2.1" | ||
}, | ||
@@ -43,0 +43,0 @@ "jshintConfig": { |
@@ -0,1 +1,3 @@ | ||
![Test library workflow status](https://github.com/tcort/link-check/workflows/Test%20library/badge.svg) | ||
# link-check | ||
@@ -2,0 +4,0 @@ |
@@ -123,2 +123,6 @@ 'use strict'; | ||
app.get(encodeURI('/url_with_unicode–'), function (req, res) { | ||
res.sendStatus(200); | ||
}); | ||
const server = http.createServer(app); | ||
@@ -461,2 +465,13 @@ server.listen(0 /* random open port */, 'localhost', function serverListen(err) { | ||
it('should handle unicode chars in URLs', function(done) { | ||
laterCustomRetryCounter = 0; | ||
linkCheck(baseUrl + '/url_with_unicode–', function(err, result) { | ||
expect(err).to.be(null); | ||
expect(result.err).to.be(null); | ||
expect(result.status).to.be('alive'); | ||
expect(result.statusCode).to.be(200); | ||
done(); | ||
}); | ||
}); | ||
}); |
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
33419
17
592
85