u01jmg3 / ics-parser

Parser for iCalendar Events • PHP 8+, 7 (≥ 7.4), 5 (≥ 5.6)
MIT License
439 stars 144 forks source link

Do not remove non-breaking spaces. Fix #333 #334

Closed albig closed 4 months ago

albig commented 4 months ago

Fix #333 - do not remove non-breaking spaces

u01jmg3 commented 4 months ago

Can you rebase against master, please? I'll fix Rector on my end.

Also, does this other space removal (line 646) affect your iCal feed?

https://github.com/u01jmg3/ics-parser/blob/6cbb1da5966b15c849a96c4c9923feae8ce5ec1b/src/ICal/ICal.php#L642-L647

albig commented 4 months ago

This replacement of \xc2\xa0 into ` doesn't affect me. This would be& `, right? The "non-breaking space" comes alone without HTML markup.

u01jmg3 commented 4 months ago

It's the whole thing, both characters - I just wanted to check anyway.

What is \xc2\ xa0? The \xc2\xa0 is the UTF-8 representation of the unicode U+00A0 (non-breaking space), which is shown as \xa0 in the representation of the decoded Unicode string.