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

Decode HTML entities in iCalendar text #23638

Merged
merged 1 commit into from
Jun 20, 2022

Conversation

jensschuppe
Copy link
Contributor

Overview

Fixes dev/core#1541 (and the much older https://issues.civicrm.org/jira/browse/CRM-13645). iCal event description contains encoded HTML entities when it should be plain text. This PR decodes HTML entities.

Before

Text in iCalendar file contains HTML entities like ü or &npsp;.

After

HTML entites are decoded to plain text.

Technical Details

Note from user pminf:

Note that html in iCalendar is fine if the "Alternate Text Representation" points to a "text/html" content portion (see https://tools.ietf.org/html/rfc5545#section-3.2.1 for details).

Comments

This is basically just the patch that had been provided in the issue by user pminf.

@civibot
Copy link

civibot bot commented May 31, 2022

(Standard links)

@civibot civibot bot added the master label May 31, 2022
@mlutfy
Copy link
Member

mlutfy commented Jun 20, 2022

hi @jensschuppe - thanks for the patch!

I stumbled on this bug as well, and the PR fixes a large part of the problem. I also had another issue, because of the str_split, but I will open a separate PR.

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

Successfully merging this pull request may close these issues.

2 participants