-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
Undefined array key warning if DESCRIPTION contains HTML ampersand entities #317
Comments
Thanks for logging this issue. A PR is welcome. |
I have a workaround for now, but I don't know the code base well enough to offer a proper fix. My workaround (PHP >= 7) is to just append |
|
I see that the change committed is only accounting for non-breaking spaces but not other HTML ampersand entities. Did you confirm that it was only nbsp’s that were causing the problem? |
I've focussed on the non-breaking space for now as it affects the unfolding mechanism that's permitted in the iCal spec. |
8.1.2
America/Chicago
3.2.1
Description of the Issue:
If the .ics file contains an ampersand entity in the DESCRIPTION (though I suspect the issue may just be the semicolon), I get the following PHP warnings:
Warning: Undefined array key 4 in /var/www/.../ics-parser/src/ICal/ICal.php on line 1033
Warning: Undefined array key 4 in /var/www/.../ics-parser/src/ICal/ICal.php on line 1042
(The attached file has a
.txt
extension appended so GitHub will accept the upload.)AmpersandEntityExample.ics.txt
Steps to Reproduce:
Use attached example which contains an HTML ampersand entity in the DESCRIPTION. This is an actual example from one of my users, with all events other than the one containing the ampersand entity removed.
The text was updated successfully, but these errors were encountered: