Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[BUG] Unescaped caption text breaks WebVTT and SMPTE-TT output

Đang mở
#2,437 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
c
Lĩnh vực
backend

Hướng nghiên cứu

Start by tracing how caption text is written by the WebVTT and SMPTE-TT output paths; the issue does not name source files or tests. Reproduce with the linked 77-byte RCWT sample and the listed commands, including parsing the XML output. Done when the caption remains visible as literal text in WebVTT and SMPTE-TT output parses as valid XML, while generated formatting remains intact.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Caption text <BOB> & HI is written without escaping: WebVTT loses <BOB> when rendered, and SMPTE-TT produces invalid XML. Both commands exit with status 0.

Tested: Linux x86_64, CCExtractor 0.96.5 at 6c9fc900. Regression status unknown.

Reproduce

Download markup.bin, a 77-byte RCWT sample containing that caption, then run:

ccextractor markup.bin --out=webvtt -o markup.vtt
ccextractor markup.bin --out=smptett -o markup.xml
python3 -c 'import xml.etree.ElementTree as E; E.parse("markup.xml")'
Actual result
  • WebVTT: Chromium's cue.getCueAsHTML().textContent gives & HI; the literal <BOB> is treated as a tag.
  • SMPTE-TT: output contains <span><BOB> & HI. XML parsing fails: not well-formed (invalid token): line 20, column 21.
  • Control: transcript output preserves the full caption. A HELLO WORLD sample produces parseable XML.

Sample generator and control · Generated WebVTT · Generated XML

Expected

Preserve <BOB> & HI as visible text and produce valid XML. Escape literal caption characters, e.g. &lt;BOB&gt; &amp; HI, without escaping encoder-generated formatting.

Related: #1703 proposed escaping for SRT but was closed without merging.

Screenshot

Actual generated WebVTT parsed in a browser verification page:

Original caption compared with browser-parsed output

Ngôn ngữ chính
C
Star
912
Fork
598
Merge trung bình
2 ngày 7 giờ
Pull request đã merge (30 ngày)
29

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của CCExtractor/ccextractor

Tất cả issue của CCExtractor/ccextractor

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.