fyne-io / fyne

Cross platform GUI toolkit in Go inspired by Material Design
https://fyne.io/
Other
25.29k stars 1.41k forks source link

When packaging an ampersand in "Name" causes an error #3195

Closed andrewheberle closed 1 year ago

andrewheberle commented 2 years ago

Checklist

Describe the bug

When packaging a Fyne app I cam across an issue where I had the application name in the FyneApp.toml containing an ampersand:

[Details]
  Icon = "logo.png"
  Name = "App With & In Name"
  ID = "com.example.app-with-ampersand-in-name"
  Version = "1.1.0"
  Build = 1

This resulted in an error The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail similar to #1521

After reviewing the Windows Event Log there were entries showing Error in manifest or policy file "C:\path\to\app.exe" on line 2. Invalid Xml syntax

After replacing the & with and the issue went away.

I would assume the name is not being properly escaped in the generated manifest as an ampersand must be escaped as & in XML.

How to reproduce

  1. Create FyneApp.toml with Name containing and ampersand character
  2. Package using fyne package -os windows
  3. Attempt to run app

Screenshots

No response

Example code

No code example, issue is with app manifest generation of fyne command line tool.

Fyne version

2.2.3

Go compiler version

1.19

Operating system

Windows

Operating system version

Windows 11

Additional Information

No response

andydotxyz commented 1 year ago

Will be in v2.3.2 :)