Project

General

Profile

Bug #857340

Qt: ampersands in ruleset/user text can cause unwanted mnemonics

Added by Jacob Nevins 6 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
gui-qt
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

There are a number of places where the '&' (ampersand) character in ruleset- or user-defined text is not escaped, and can cause unwanted mnemonics to appear in Qt menus and buttons.

One example is the nation 'J&W' in the alien ruleset; on the start screen, if that nation is selected, then the pick-nation button becomes 'J_W_' (crude rendering).

The '&' character is a reasonable thing for a ruleset, city name, etc to contain. is_allowed_city_name() allows it at its most strict (and Cut & Shoot, Tyne & Wear, etc are not implausible place names).

This affects menus (where they mention extras, governments, actions, etc); action choice dialogs; the "pick nation" button; and the "rename city" button.

m-qt-ampersand.patch (15.7 KB) m-qt-ampersand.patch master Jacob Nevins, 2020-01-26 02:48 AM
30-qt-ampersand.patch (15.7 KB) 30-qt-ampersand.patch S3_0 Jacob Nevins, 2020-01-26 02:48 AM
26-qt-ampersand.patch (13.3 KB) 26-qt-ampersand.patch S2_6 Jacob Nevins, 2020-01-26 02:48 AM

History

#1 Updated by Jacob Nevins 6 months ago

#2 Updated by Jacob Nevins 6 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF