6.0.0-beta1
8/10/25

[#5241] newChoice function broken
Summary newChoice function broken
Queue Kronolith
Queue Version HEAD
Type Bug
State Resolved
Priority 1. Low
Owners
Requester vincent.vinet (at) revolutionlinux (dot) com
Created 04/11/2007 (6696 days ago)
Due
Updated 04/12/2007 (6695 days ago)
Assigned
Resolved 04/12/2007 (6695 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch Yes

History
04/12/2007 08:35:14 PM Chuck Hagenbuch Deleted Original Message
 
04/12/2007 08:35:09 PM Chuck Hagenbuch Comment #2
State ⇒ Resolved
Reply to this comment
addslashes() is the general solution to this - committed, thanks for 
the heads up. As for the HTML validation errors, does the backslash 
both solve the validation issue and not create other side effects?
04/11/2007 01:29:02 PM vincent (dot) vinet (at) revolutionlinux (dot) com Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ newChoice function broken
Queue ⇒ Kronolith
New Attachment: calendars.inc.patch
State ⇒ Unconfirmed
Reply to this comment
In the Calendar Management screen,

the newChoice function is broken by JavaScript that does not compile.



the two lines like this:

urlObj.innerHTML = '<em><?php echo _("Select a calendar above to 
display the URL") ?></em>';

break when gettext returns a string containing a single quote, i.e. in 
the fr_FR translation



Also, </em> throws a warning as to html validation, because the "/" 
must be escaped ("<\/em>")



I do not know if this is an ideal solution, as it would now break with 
double quotes.

Saved Queries