Skip to content

add additional double quote conversion to FRED and qtFRED#7008

Merged
Goober5000 merged 2 commits into
scp-fs2open:masterfrom
Goober5000:more_fred_replace_stuff
Aug 28, 2025
Merged

add additional double quote conversion to FRED and qtFRED#7008
Goober5000 merged 2 commits into
scp-fs2open:masterfrom
Goober5000:more_fred_replace_stuff

Conversation

@Goober5000

Copy link
Copy Markdown
Contributor

Any place in FRED that uses XSTR is susceptible to double quotes interfering with the standard XSTR format, not just the expected briefing, debriefing, messages, etc. This PR adds lcl_fred_replace_stuff() - which handles not only quotes but semicolons and slashes as well - to the other places where XSTR is used.

(Note that quotes are handled just fine in non-XSTR fields. Semicolons will still truncate non-XSTR fields, but addressing that is beyond the scope of this PR as it would require editing every text field in FRED. Fortunately, errant semicolons merely modify the text as opposed to corrupting the mission file.)

Fixes #7005 in both FRED and qtFRED; tested in both. Caveat aedificator: the briefing editor is not yet implemented in qtFRED, so the relevant fixes to briefing icon labels and closeup labels cannot yet be ported over.

Any place in FRED that uses XSTR is susceptible to double quotes interfering with the standard XSTR format, not just the expected briefing, debriefing, messages, etc.  This PR adds `lcl_fred_replace_stuff()` - which handles not only quotes but semicolons and slashes as well - to the other places where XSTR is used.

(Note that quotes are handled just fine in non-XSTR fields.  Semicolons will still truncate non-XSTR fields, but addressing that is beyond the scope of this PR as it would require editing every text field in FRED.  Fortunately, errant semicolons merely modify the text as opposed to corrupting the mission file.)

Fixes scp-fs2open#7005 in both FRED and qtFRED; tested in both.  Caveat aedificator: the briefing editor is not yet implemented in qtFRED, so the relevant fixes to briefing icon labels and closeup labels cannot yet be ported over.
@Goober5000 Goober5000 added fix A fix for bugs, not-a-bugs, and/or regressions. qtfred A feature or issue related to qtFred. labels Aug 28, 2025
@Goober5000 Goober5000 added the fred A feature or issue related to the FReespace EDitor (FRED) label Aug 28, 2025
@github-project-automation github-project-automation Bot moved this to Work In Progress (PRs) in qtFRED2 Aug 28, 2025

@wookieejedi wookieejedi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Straightforward and good to have this fixed

@github-project-automation github-project-automation Bot moved this from Work In Progress (PRs) to In Review (PRs) in qtFRED2 Aug 28, 2025
@Goober5000 Goober5000 merged commit 9c65e1c into scp-fs2open:master Aug 28, 2025
20 checks passed
@Goober5000 Goober5000 deleted the more_fred_replace_stuff branch August 28, 2025 23:11
@github-project-automation github-project-automation Bot moved this from In Review (PRs) to Done in qtFRED2 Aug 28, 2025
Goober5000 added a commit to Goober5000/fs2open.github.com that referenced this pull request Sep 8, 2025
The double quote conversions added in scp-fs2open#7008 were removed in scp-fs2open#6961, probably inadvertently due to the branch merge.  This adds them back.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix A fix for bugs, not-a-bugs, and/or regressions. fred A feature or issue related to the FReespace EDitor (FRED) qtfred A feature or issue related to qtFred.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

FRED barfs on double quotes in goals

3 participants