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

Fix: Sanitize XML comment to prevent invalid token errors #1641

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ShobikaG
Copy link

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 :

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

Pull Request 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant