Skip to content

[FIX] escape special characters ( < > & ) to HTML context #1703

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

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

Conversation

AlvinLi-harmonicinc
Copy link

@AlvinLi-harmonicinc AlvinLi-harmonicinc commented Jun 13, 2025

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 have never used CCExtractor.
  • I have used CCExtractor just a couple of times.
  • I absolutely love CCExtractor, but have not contributed previously.
  • I am an active contributor to CCExtractor.

The <, >, & is not suppose to be appeared in SRT, because SRT supports HTML tags.
So, the content of SRT should be treated as HTML content with those characters being escaped.
As a result, this pull request intends to do the following:

  • convert & to &amp;
  • convert < to &lt;
  • convert > to &gt;

@ccextractor-bot
Copy link
Collaborator

CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit 5b327c7...:

Report Name Tests Passed
Broken 10/13
CEA-708 6/14
DVB 7/7
DVD 3/3
DVR-MS 0/2
General 12/27
Hauppage 2/3
MP4 3/3
NoCC 10/10
Options 26/86
Teletext 21/21
WTV 8/13
XDS 16/34

All tests passing on the master branch were passed completely.

NOTE: The following tests have been failing on the master branch as well as the PR:

Congratulations: Merging this PR would fix the following tests:


Check the result page for more info.

@ccextractor-bot
Copy link
Collaborator

CCExtractor CI platform finished running the test files on windows. Below is a summary of the test results, when compared to test for commit 407d0f4...:

Report Name Tests Passed
Broken 9/13
CEA-708 7/14
DVB 2/7
DVD 0/3
DVR-MS 0/2
General 11/27
Hauppage 1/3
MP4 3/3
NoCC 10/10
Options 23/86
Teletext 4/21
WTV 7/13
XDS 12/34

All tests passing on the master branch were passed completely.

NOTE: The following tests have been failing on the master branch as well as the PR:

Congratulations: Merging this PR would fix the following tests:


Check the result page for more info.

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.

2 participants