Skip to content

Node.js based forum software built for the modern web

fix: protocol-relative URLs being accidentally munged, #13592

Julian Lamcc6fd49c4d2d
diff --git a/src/posts/parse.js b/src/posts/parse.js
index 8d0c902e46..f2017c2106 100644
--- a/src/posts/parse.js
+++ b/src/posts/parse.js
@@ -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