[Koha-bugs] [Bug 18689] New: adding a holiday in holidays.pl with double-quotes in title or description breaks calendar.

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon May 29 04:30:12 CEST 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689

            Bug ID: 18689
           Summary: adding a holiday in holidays.pl with double-quotes in
                    title or description breaks calendar.
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Tools
          Assignee: gmcharlt at gmail.com
          Reporter: barton at bywatersolutions.com
        QA Contact: testopia at bugs.koha-community.org

To replicate:

1/ Go to Tools > Calendar
2/ Click on a date
3/ Enter a title with text enclosed in double quotes "like this".
4/ Click Save

This will cause a JavaScript error that prevents the calendar from displaying:

holidays.pl?branch=CPL&calendardate=2017-05-01:382 Uncaught SyntaxError:
Unexpected identifier

Here's an example of the code that's erroring out:

holidays["2017/5/1"] = {title:"This will cause "failure". ",
description:"asdf"};

The problem is that the quotes are not escaped.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list