Auto-Generated project templates should escape developers full name
Affected version
- Nightly flatpak: Yes (2024-03-05)
- Other: Fedora 39, 45.0
Additional information
So i got married recently and that changed my last name (added -O'Sullivan
).
I configured my account in Gnome accordingly.
I played around with python/gtk and now wanted to move my project to Gnome-Builder as i want to publish this as flatpak in the future.
Steps to reproduce
- Change your full name in account settings to contain
'
. - Create a new project in Gnome Builder (Python)
- Try to Run/Compile
Current behavior
Gnome Builder uses the Full name "as is" and autofills the template project files with it without escaping any characters.
When creating a new python project it puts the following into src/main.py
(line 51):
def on_about_action(self, widget, _):
"""Callback for the app.about action."""
about = Adw.AboutWindow(transient_for=self.props.active_window,
application_name='codify',
application_icon='org.gnome.Codify',
developer_name='Nils Thiele-O'Sullivan',
version='0.1.0',
developers=['Nils Thiele-O'Sullivan'],
copyright='© 2024 Nils Thiele-O'Sullivan')
about.present()
This of course results in a project/code that won't be executable:
Anwendung startet um 10:36:16
Traceback (most recent call last):
File "/app/bin/codify", line 45, in <module>
from codify import main
File "/app/share/codify/codify/main.py", line 56
developer_name='Nils Thiele-O'Sullivan',
^
SyntaxError: unterminated string literal (detected at line 56)
Its easy to catch but for novice users/coders it could be a bit confusing when following "getting started" tutorials.
Expected behavior
When generating the project template files, Gnome Builder should escape the users full name.