Skip to content

Commit e22f1f7

Browse files
authoredOct 14, 2024··
Merge pull request #6 from UnicodeDigital/alert-autofix-1
Fix code scanning alert no. 1: Incomplete URL scheme check
2 parents 6b9efb4 + 059aae2 commit e22f1f7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

Diff for: ‎src/utils/permalinks.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ export const getPermalink = (slug = '', type = 'page'): string => {
4747
slug.startsWith('http://') ||
4848
slug.startsWith('://') ||
4949
slug.startsWith('#') ||
50-
slug.startsWith('javascript:')
50+
slug.trim().toLowerCase().startsWith('javascript:') ||
51+
slug.trim().toLowerCase().startsWith('data:') ||
52+
slug.trim().toLowerCase().startsWith('vbscript:')
5153
) {
5254
return slug;
5355
}

0 commit comments

Comments
 (0)
Please sign in to comment.