Skip to content

Commit ae4f298

Browse files
UlisesGasconctcpip
andcommitted
Merge commit from fork
Co-authored-by: Chris de Almeida <ctcpip@users.noreply.github.com>
1 parent b69cbb3 commit ae4f298

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

index.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,7 @@ SendStream.prototype.redirect = function redirect (path) {
482482
}
483483

484484
var loc = encodeUrl(collapseLeadingSlashes(this.path + '/'))
485-
var doc = createHtmlDocument('Redirecting', 'Redirecting to <a href="' + escapeHtml(loc) + '">' +
486-
escapeHtml(loc) + '</a>')
485+
var doc = createHtmlDocument('Redirecting', 'Redirecting to ' + escapeHtml(loc))
487486

488487
// redirect
489488
res.statusCode = 301

test/send.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ describe('send(file).pipe(res)', function () {
358358
.get('/pets')
359359
.expect('Location', '/pets/')
360360
.expect('Content-Type', /html/)
361-
.expect(301, />Redirecting to <a href="\/pets\/">\/pets\/<\/a></, done)
361+
.expect(301, />Redirecting to \/pets\/</, done)
362362
})
363363

364364
it('should respond with default Content-Security-Policy', function (done) {
@@ -386,7 +386,7 @@ describe('send(file).pipe(res)', function () {
386386
.get('/snow')
387387
.expect('Location', '/snow%20%E2%98%83/')
388388
.expect('Content-Type', /html/)
389-
.expect(301, />Redirecting to <a href="\/snow%20%E2%98%83\/">\/snow%20%E2%98%83\/<\/a></, done)
389+
.expect(301, />Redirecting to \/snow%20%E2%98%83\/</, done)
390390
})
391391
})
392392

0 commit comments

Comments
 (0)