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

Apostrophe in shortcut name field breaking packaging. #760

Closed
Jaylyn-Barbee opened this issue Feb 6, 2023 · 4 comments · Fixed by #761
Closed

Apostrophe in shortcut name field breaking packaging. #760

Jaylyn-Barbee opened this issue Feb 6, 2023 · 4 comments · Fixed by #761

Comments

@Jaylyn-Barbee
Copy link

Describe the bug
One of our users over at PWABuilder was attempting to package their site: https://www.lagendanews.com/. In their manifest they have inside of their shortcuts field "name": "L'Agenda N" however, in the bubblewrap service this becomes name:'L'Agenda N' which is breaking due to the single tick inside the name string.

Should we advise them to not using ticks in their string or is this a bug?

To Reproduce
Steps to reproduce the behavior:
You can use the bubblewrap cli with the manifest url https://www.lagendanews.com/superpwa-manifest.json with default options, should fail at the bubblewrap build step

Expected behavior
Expected this character to be escaped or something like that in order to allow packaging

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Edge
  • Version: Current

Additional context
Associated PWABuilder issue: pwa-builder/PWABuilder#3817

@andreban
Copy link
Member

andreban commented Feb 6, 2023

I can repro the issue. Here's the relevant bit of the issue:

Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
build file 'D:\Projects\twa-project\app\build.gradle': 41: unexpected token: Agenda @ line 41, column 26.
       shortcuts: [[name:'L'Agenda N', short_name:'L'Agenda N', url:'https://www.lagendanews.com/', icon:'shortcut_0']],

The issue is in ShortcutInfro#toString(), which doesn't properly escape the string. The string can be escaped with the escapeGradleString() method.

andreban added a commit to andreban/llama-pack that referenced this issue Feb 6, 2023
@andreban
Copy link
Member

andreban commented Feb 6, 2023

I created #761 with a fix.

andreban added a commit that referenced this issue Feb 7, 2023
@nmetulev
Copy link

nmetulev commented Feb 9, 2023

Thanks for fixing this so quickly. Out of curiosity, what's the release schedule for these fixes?

@andreban
Copy link
Member

We don't have a release schedule and have been releasing "as needed". This is now on v1.19.1. Do let us know if working for you, as there have been changes within the SVG support (should work more widely)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants