Merge pull request #191 from public-awesome/update-whitespace-handling-in-urls

Update whitespace handling in existing URLs
This commit is contained in:
Serkan Reis 2023-07-17 17:14:28 +03:00 committed by GitHub
commit adeba3e9d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 12 deletions

View File

@ -106,8 +106,8 @@ export const ImageUploadDetails = ({ onChange, mintRule }: ImageUploadDetailsPro
.replace(/,/g, '') .replace(/,/g, '')
.replace(/"/g, '') .replace(/"/g, '')
.replace(/'/g, '') .replace(/'/g, '')
.replace(/ /g, '') .replace(regex, '')
.replace(regex, ''), .trim(),
} }
onChange(data) onChange(data)
} catch (error: any) { } catch (error: any) {

View File

@ -239,15 +239,15 @@ export const UploadDetails = ({ onChange, minterType, baseMinterAcquisitionMetho
.replace(/,/g, '') .replace(/,/g, '')
.replace(/"/g, '') .replace(/"/g, '')
.replace(/'/g, '') .replace(/'/g, '')
.replace(/ /g, '') .replace(regex, '')
.replace(regex, ''), .trim(),
imageUrl: coverImageUrlState.value imageUrl: coverImageUrlState.value
.replace('IPFS://', 'ipfs://') .replace('IPFS://', 'ipfs://')
.replace(/,/g, '') .replace(/,/g, '')
.replace(/"/g, '') .replace(/"/g, '')
.replace(/'/g, '') .replace(/'/g, '')
.replace(/ /g, '') .replace(regex, '')
.replace(regex, ''), .trim(),
baseMinterMetadataFile, baseMinterMetadataFile,
} }
onChange(data) onChange(data)

View File

@ -115,8 +115,8 @@ export const ImageUploadDetails = ({ onChange }: ImageUploadDetailsProps) => {
.replace(/,/g, '') .replace(/,/g, '')
.replace(/"/g, '') .replace(/"/g, '')
.replace(/'/g, '') .replace(/'/g, '')
.replace(/ /g, '') .replace(regex, '')
.replace(regex, ''), .trim(),
coverImageUrl: coverImageUrlState.value.trim(), coverImageUrl: coverImageUrlState.value.trim(),
} }
onChange(data) onChange(data)

View File

@ -194,15 +194,15 @@ export const OffChainMetadataUploadDetails = ({
.replace(/,/g, '') .replace(/,/g, '')
.replace(/"/g, '') .replace(/"/g, '')
.replace(/'/g, '') .replace(/'/g, '')
.replace(/ /g, '') .replace(regex, '')
.replace(regex, ''), .trim(),
imageUrl: coverImageUrlState.value imageUrl: coverImageUrlState.value
.replace('IPFS://', 'ipfs://') .replace('IPFS://', 'ipfs://')
.replace(/,/g, '') .replace(/,/g, '')
.replace(/"/g, '') .replace(/"/g, '')
.replace(/'/g, '') .replace(/'/g, '')
.replace(/ /g, '') .replace(regex, '')
.replace(regex, ''), .trim(),
openEditionMinterMetadataFile, openEditionMinterMetadataFile,
} }
onChange(data) onChange(data)