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

Escape '&' in mod list, consistent path separators in exception #3149

Merged
merged 1 commit into from
Sep 19, 2020

Conversation

DasSkelett
Copy link
Member

Problems

Ampersands (&) in mod names or abstracts in the mod list are currently interpreted as hint to create automatic keyboard shortcuts (visualized through underscores), instead of printing them as literal.
See for example the mod DumpAndBurn, with the name Dump&Burn!:
unescaped-ampersand

Error messages of krakens thrown while trying to load the GUIConfig.xml have a mix of / and \ as path seperators on Windows, like:

Unhandled Exception:
CKAN.Kraken: Error trying to parse "c:/program files(x86)/steam/SteamApps/common/Kerbal Space Program/CKAN\GUIConfig.xml": Root element missing.

Changes

The texts in the name, author and abstract are now escaped using && in ModList.MakeRow(). I didn't spot another location where they would need escaping (tested recommendation tab and modpack export tab).

The exception about broken GUIConfig.xml files now gets the path string from a FileInfo object, which should always be formatted consistently and correctly for the user's OS.

@DasSkelett DasSkelett added Bug Something is not working as intended Easy This is easy to fix GUI Issues affecting the interactive GUI labels Sep 5, 2020
@DasSkelett DasSkelett requested a review from HebaruSan September 5, 2020 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended Easy This is easy to fix GUI Issues affecting the interactive GUI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants