[PR #1642] [CLOSED] Fix Issue#1235: Sanitize XML comment to prevent invalid token errors #2352

Open
opened 2026-01-29 17:21:41 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/CCExtractor/ccextractor/pull/1642
Author: @ShobikaG
Created: 9/15/2024
Status: Closed

Base: masterHead: master


📝 Commits (1)

  • acf7d21 Fix Issue#1235: Sanitize XML comment to prevent invalid token errors

📊 Changes

1 file changed (+26 additions, -1 deletions)

View changed files

📝 src/lib_ccx/ccx_encoders_spupng.c (+26 -1)

📄 Description

Fix Issue#1235: Sanitize XML comment to prevent invalid token errors

In raising this pull request, I confirm the following (please check boxes):

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.
  • I have mentioned this change in the changelog.

My familiarity with the project is as follows (check one):

  • I absolutely love CCExtractor, but have not contributed previously.

Pull Requests Description :

  • Added logic to detect and replace any occurrence of "--" in comments with a single "-" to ensure valid XML.
  • Used a bulk write ('fwrite') to efficiently handle portions of the string that don't contain invalid sequences.
  • Ensured that comments are written correctly without altering the original structure of the code.
  • Updated function 'write_spucomment' to handle the sanitization process efficiently.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/CCExtractor/ccextractor/pull/1642 **Author:** [@ShobikaG](https://github.com/ShobikaG) **Created:** 9/15/2024 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`acf7d21`](https://github.com/CCExtractor/ccextractor/commit/acf7d2105be8e1680abca4e1816730c71679b15f) Fix Issue#1235: Sanitize XML comment to prevent invalid token errors ### 📊 Changes **1 file changed** (+26 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/lib_ccx/ccx_encoders_spupng.c` (+26 -1) </details> ### 📄 Description # Fix Issue#1235: Sanitize XML comment to prevent invalid token errors **In raising this pull request, I confirm the following (please check boxes):** - [ ] I have read and understood the [contributors guide](https://github.com/CCExtractor/ccextractor/blob/master/.github/CONTRIBUTING.md). - [ ] I have checked that another pull request for this purpose does not exist. - [ ] I have considered, and confirmed that this submission will be valuable to others. - [ ] I accept that this submission may not be used, and the pull request closed at the will of the maintainer. - [ ] I give this submission freely, and claim no ownership to its content. - [ ] **I have mentioned this change in the [changelog](https://github.com/CCExtractor/ccextractor/blob/master/docs/CHANGES.TXT).** **My familiarity with the project is as follows (check one):** - [ ] I absolutely love CCExtractor, but have not contributed previously. --- ## Pull Requests Description : - Added logic to detect and replace any occurrence of "--" in comments with a single "-" to ensure valid XML. - Used a bulk write ('fwrite') to efficiently handle portions of the string that don't contain invalid sequences. - Ensured that comments are written correctly without altering the original structure of the code. - Updated function 'write_spucomment' to handle the sanitization process efficiently. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 17:21:41 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#2352