Skip to content

Commit 553aec3

Browse files
committed
ExternalDocs URL ignored due to incorrect protocol handling in getSanitizedUrl. Fix #303
1 parent b9749fa commit 553aec3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/utils/common-utils.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export function getSanitizedUrl(urlString) {
176176
try {
177177
// eslint-disable-next-line no-new
178178
const url = new URL(urlString);
179-
return url.protocol === 'http' || url.protocol === 'https' ? url : '';
179+
return url.protocol === 'http:' || url.protocol === 'https:' ? url : '';
180180
} catch (error) {
181181
return '';
182182
}

0 commit comments

Comments
 (0)