JM-Lemmi / ical-relay

Relay ical urls and edit them on the fly with different modules.
GNU Affero General Public License v3.0
9 stars 2 forks source link

fix: Use explicit getters and setters for common properties #243

Closed frereit closed 9 months ago

frereit commented 9 months ago

This ensures values are correctly escaped.

When setting properties using SetDescription, it is escaped. This ensures a well-formed iCal file. Using GetDescription returns the unescaped string, resulting in a well-rendered frontend.

This is blocked by JM-Lemmi/golang-ical#7. Merging before that PR is merged, and then incorporated back into this repository via the submodule, will break things.

JM-Lemmi commented 9 months ago

Fixing files that were ruined by this bug:

find the number of files that contain three or more backslashes: grep -le '\\\\\\' * | wc -l

replace three backslashes by two backslashes: find /etc/ical-relay/calstore/ -type f -exec sed -i 's/\\\\\\/\\\\/g' {} +

replace any leftover lines that only contain two backslashes: find /etc/ical-relay/calstore/ -type f -exec sed -i '/ \\\\/d' {} +