8000 Fix #6341: Improved Name Escaping when Saving Unit in MekHQ's MekLab by IllianiBird · Pull Request #6595 · MegaMek/mekhq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix #6341: Improved Name Escaping when Saving Unit in MekHQ's MekLab #6595

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

Merged
merged 5 commits into from
Apr 12, 2025

Conversation

IllianiBird
Copy link
Collaborator
@IllianiBird IllianiBird commented Apr 8, 2025
  • Fixed a bug where users were unable to save units if the unit name included / or \.

Fix #6341

- Fixed a bug where users were unable to save units if the unit name included `/` or `\`.
@IllianiBird IllianiBird added Bug Parts/Repair/Refit Severity: Medium Issues described as medium severity as per the new issue form labels Apr 8, 2025
@IllianiBird IllianiBird self-assigned this Apr 8, 2025
Copy link
codecov bot commented Apr 8, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 11.41%. Comparing base (6fb3aff) to head (a5acb7d).
Report is 93 commits behind head on master.

Files with missing lines Patch % Lines
MekHQ/src/mekhq/campaign/parts/Refit.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6595      +/-   ##
============================================
- Coverage     11.41%   11.41%   -0.01%     
- Complexity     6448     6452       +4     
============================================
  Files          1088     1089       +1     
  Lines        139773   139838      +65     
  Branches      21624    21643      +19     
============================================
+ Hits          15949    15956       +7     
- Misses       122230   122286      +56     
- Partials       1594     1596       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

# Conflicts:
#	MekHQ/src/mekhq/campaign/parts/Refit.java
@IllianiBird IllianiBird added Severity: Critical Issues described as critical as per the new issue form Severity: Medium Issues described as medium severity as per the new issue form and removed Severity: Medium Issues described as medium severity as per the new issue form Severity: Critical Issues described as critical as per the new issue form labels Apr 9, 2025
@rjhancock
Copy link
Collaborator

Instead of escaping the file name, place it inside of a CDATA block.

@IllianiBird
Copy link
Collaborator Author

CDATA doesn't work here because this isn't an xml entry, it's a filename. Wrapping it in a CDATA doesn't fix the issue, we're just using the xml escaping to ensure we don't need to input a manual escaping rule. The only issue being that / and \ aren't escaped by the stock method, which is why I've added a special case.

@IllianiBird IllianiBird merged commit 50f9e52 into MegaMek:master Apr 12, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Parts/Repair/Refit Severity: Medium Issues described as medium severity as per the new issue form
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Issue] HQ Meklab, Putting '/' in the name of a refit throws an error.
2 participants
0