Skip to content

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 (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.

@ccextractor-bot

This comment was marked as outdated.

@ccextractor-bot

This comment was marked as outdated.

@steel-bucket
Copy link
Contributor

Hi, can you rebase, push the rebase, and run the command(this could be found in the format directory as well)

find src/ -type f -not -path "src/thirdparty/*" -not -path "src/lib_ccx/zvbi/*" -name '*.c' -not -path "src/GUI/icon_data.c" | xargs clang-format -i
          git diff-index --quiet HEAD -- || (git diff && exit 1)

in the root directory(./ccextractor).
And then push again.
This will automatically fix the failing CI test.
Thanks a lot.

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.

3 participants