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

Non-breaking spaces are removed from DESCRIPTION #333

Closed
albig opened this issue Feb 20, 2024 · 1 comment · Fixed by #334
Closed

Non-breaking spaces are removed from DESCRIPTION #333

albig opened this issue Feb 20, 2024 · 1 comment · Fixed by #334

Comments

@albig
Copy link
Contributor

albig commented Feb 20, 2024

PHP Version

8.2.15

PHP date.timezone

Europe/Berlin

ICS Parser Version

3.3.1 / master

Operating System

Linux

Description

If an event contains a non-breakable space (\xA0) in the DESCRIPTION, this space will be removed by ics-parser. This happens in removePrintableCharacters in https://github.com/u01jmg3/ics-parser/blob/master/src/ICal/ICal.php#L2463.

I wonder, why this is done and why this space is not replaced by an ordinary space instead?

A Sample ICS-File is this:
E6F2B1A6-D81E-4BAB-9680-97CCB60AFB78.ics.txt

The resulting description is

2024-02-20_10-37

Of course, this can be fixed easily by the client itself and in the sample case, there is no need to use non-breakable spaces. But you know, not everybody is a nerd ;-)

Importing the same event into Thunderbird or the Linux cinnamon calendar just keeps the non-breaking space as is.

Steps to Reproduce

  • Use Libreoffcie writer and write some text with non-breakable spaces (CTRL+SPACE)
  • copy the text into a nextcloud calendar event
  • import the nextcloud calendar via ICS with ics-parser
@u01jmg3
Copy link
Owner

u01jmg3 commented Feb 20, 2024

PR welcome

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

Successfully merging a pull request may close this issue.

2 participants