Parsing bug in PLEG (RESOLVED)

SOLVED: The Reactor plugin does not have this apostrophe issue when looking at gCal entries.

This bug has actually existed for a while now. I discovered it back in version 8.1 and reported it, but I never followed through. I was hoping that it would have magically been resolved in 9.x, so I opted to test it again. (BTW, my post about this was prior to Ezlo and the new forum site. Hence the new post.)

I change the color of my outside lights based on various holiday’s within Google’s public Holiday calendar. I use the “has event name” option for my trigger from the GCal app/device. For 95% of the holiday’s this works great. The problem is when you put in an apostrophe within the name. “Mother’s Day” for an example. LUA doesn’t need to be reloaded to trigger the issue either. Just close the PLEG editor and relaunch it. You will get an error saying “Error Restoring Triggers”. And all of your device triggers are gone. If you do reload LUA, you will get an “Error Parsing Triggers!” error in the blue status bar at the top.

I attempted to collect some debug logs, but they do not show anything other than my valid registration and the device triggers prior to putting the apostrophe in.

debug.pdf (136.0 KB)

In looking at the backup/export I took of my test PLEG, it looks like an extra carriage return is being added.

I also tried adding the event as “MOTHER’S DAY” in case it would write the XML as ‘“Mother’s Day”’, with double quotes inside of single quotes.

It would appear that ascii code of &#39 resolves the issue. Kind of an odd work around, and I don’t know if it will survive a reload or reboot yet. And the backup still appears to have an extra hard return in it.



It does survive a reload, but it doesn’t look like it matches with the calendar event. I have a feeling it is searching for “mother&#39s” specifically and the event itself contains mother’s.