Skip to content

Conversation

@Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Nov 16, 2024

XML tags inside CDATA sections don't need to be escaped, so this explicit escaping step led to an unnecessary duplicate escaping being applied.

Related:

XML tags inside `CDATA` sections don't need to be escaped, so this explicit escaping step led to an unnecessary duplicate escaping being applied.
@Turbo87 Turbo87 added C-bug 🐞 Category: unintended, undesired behavior A-backend ⚙️ labels Nov 16, 2024
@Turbo87 Turbo87 requested a review from a team November 16, 2024 22:03
@codecov
Copy link

codecov bot commented Nov 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.22%. Comparing base (3640ab0) to head (6154581).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9973      +/-   ##
==========================================
- Coverage   89.22%   89.22%   -0.01%     
==========================================
  Files         293      293              
  Lines       30394    30394              
==========================================
- Hits        27120    27118       -2     
- Misses       3274     3276       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@eth3lbert eth3lbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to https://en.wikipedia.org/wiki/CDATA#Nesting, if I understand correctly, we need to encode ]]> if description contains it.

@Turbo87
Copy link
Member Author

Turbo87 commented Nov 17, 2024

I added another commit that explicitly checks for ]]> escaping and it looks like you discovered a bug in the rss/quick-xml crate(s). It does not appear to get escaped properly. I'll report it over there and see if I can fix it.

@Turbo87
Copy link
Member Author

Turbo87 commented Nov 17, 2024

@Turbo87
Copy link
Member Author

Turbo87 commented Nov 17, 2024

I'll merge this PR for now until the issue is fixed upstream :)

@Turbo87 Turbo87 merged commit e44b452 into rust-lang:main Nov 17, 2024
10 checks passed
@Turbo87 Turbo87 deleted the rss-escaping branch November 17, 2024 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-backend ⚙️ C-bug 🐞 Category: unintended, undesired behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants