Skip to content

Commit

Permalink
Fix data: URLs in ?project_url=
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Aug 13, 2024
1 parent ecd47d0 commit fb846ef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/project-fetcher-hoc.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@ const ProjectFetcherHOC = function (WrappedComponent) {
null :
new URLSearchParams(location.search).get('project_url');
if (projectUrl) {
if (!projectUrl.startsWith('http:') && !projectUrl.startsWith('https:')) {
if (
!projectUrl.startsWith('http:') &&
!projectUrl.startsWith('https:') &&
!projectUrl.startsWith('data:')
) {
projectUrl = `https://${projectUrl}`;
}
assetPromise = fetch(projectUrl)
Expand Down

0 comments on commit fb846ef

Please sign in to comment.