Cronicle
Cronicle copied to clipboard
Using [] at start of event name can result in un-deletable / un-editable events
Steps to produce:
- Create event with an event name like "[<1024 alphanumeric characters] test1"
- Edit said event
- Event has a very long eventID, and the edit buttons at the bottom are not present/rendered on the page.
Screenshot of the broken event:
Related #367
The JavaScript code:
$P().delete_event('edit')
Allows to delete as normal (including the popup to confirm)
I think you don't see buttons because those are outside the screen, they should exist.
Good point.
Confirmed they exist, but are not reachable through scrolling (clipped by containing elements).
Obviously this isn't a major issue - just noticed it testing the []
syntax more generally. I did expect some validation/sanitization on the event ID. I did notice the characters have to be alphanumeric (or, more correctly \w
) - which you confirmed in #367:
if (event.title.match(/^\[(\w+)\]\s*(.+)$/)) {
event.id = RegExp.$1;
event.title = RegExp.$2;
}