stefangabos / Zebra_Form

A jQuery augmented PHP library for creating secure HTML forms and validating them easily
Other
98 stars 49 forks source link

Fix a javascript fatal error when "today" or "clear" word contains apost... #2

Closed gilbsgilbs closed 11 years ago

gilbsgilbs commented 11 years ago

...rophes in the language used

When "Today" or "Clear" word contains apostrophes in selected language like in French : "Aujourd'hui" for today, a fatal javascript exception was caught because the generated javascript code was not correct (missing slashes).

Probably not the best solution to fix this because it may add unnecessary slashes. In addition, I don't really know if this should be fixed in Datepicker (client side) or in Zebra_Form (server side), I did with what I had. Working with a minimized version of Datepicker would have been much more difficult.

Note that there is no fix here for months and days abreviations because I don't know if it's buggy too and it would probably require a bit more work (like a loop if it were done in server side).