Skip to content

Commit 241dc32

Browse files
authored
Merge pull request #304 from gdec31/ExternalDocsUrl
ExternalDocs URL ignored due to incorrect protocol handling in getSanitizedUrl
2 parents b9749fa + 553aec3 commit 241dc32

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)