Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: display product names with an & properly #7831

Merged
merged 2 commits into from
Oct 19, 2023

Conversation

vespasianvs
Copy link
Contributor

If a productName value contains an ampersand (&), then the character does not display correctly within the NSIS Installer window. For example, if the product name is "Joe & Bloggs", in the installer window "Joe Bloggs" is seen.

NSIS allows for this by allowing the Name attribute to have two values. One with the 'true' name, and one where the ampersand is doubled so that it displays correctly, e.g.

Name "Joe & Bloggs" "Joe && Bloggs"

The changes here use the macro !searchreplace to create a new variable with the doubled ampersand and then pass it into the Name attribute. If there is no duplication of the ampersand, the second argument is still passed in, but has no effect.

This would, of course, affect anybody who has already added a double ampersand to their productName to try to escape this.

For my project, I have used patch-package to apply this change for now.

@changeset-bot
Copy link

changeset-bot bot commented Oct 17, 2023

🦋 Changeset detected

Latest commit: e0243c8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
app-builder-lib Patch
dmg-builder Patch
electron-builder-squirrel-windows Patch
electron-builder Patch
electron-forge-maker-appimage Patch
electron-forge-maker-nsis-web Patch
electron-forge-maker-nsis Patch
electron-forge-maker-snap Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented Oct 17, 2023

Deploy Preview for car-park-attendant-cleat-11576 ready!

Name Link
🔨 Latest commit e0243c8
🔍 Latest deploy log https://app.netlify.com/sites/car-park-attendant-cleat-11576/deploys/653144540ec81e000881655c
😎 Deploy Preview https://deploy-preview-7831--car-park-attendant-cleat-11576.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mmaietta mmaietta merged commit 6e41480 into electron-userland:master Oct 19, 2023
11 checks passed
@mmaietta
Copy link
Collaborator

Thanks @vespasianvs !

@github-actions github-actions bot mentioned this pull request Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants