mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: protocol-relative URLs being accidentally munged, #13592
This commit is contained in:
@@ -88,7 +88,7 @@ module.exports = function (Posts) {
|
||||
while (current !== null) {
|
||||
if (current[1]) {
|
||||
try {
|
||||
parsed = url.parse(current[1]);
|
||||
parsed = new URL(current[1]);
|
||||
if (!parsed.protocol) {
|
||||
if (current[1].startsWith('/')) {
|
||||
// Internal link
|
||||
|
||||
Reference in New Issue
Block a user