mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-30 06:30:23 +02:00
Fix title & description in calendar events were not escaped
This commit is contained in:
@ -204,6 +204,20 @@ egw.extend('utils', egw.MODULE_GLOBAL, function()
|
||||
return _comp.replace(/#/g,'%23').replace(/\?/g,'%3F').replace(/\//g,'');
|
||||
},
|
||||
|
||||
/**
|
||||
* Escape HTML special chars, just like PHP
|
||||
*
|
||||
* @param {string} s String to encode
|
||||
*
|
||||
* @return {string}
|
||||
*/
|
||||
htmlspecialchars: function(s) {
|
||||
return s.replace(/&/g, '&')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>');
|
||||
},
|
||||
|
||||
/**
|
||||
* If an element has display: none (or a parent like that), it has no size.
|
||||
* Use this to get its dimensions anyway.
|
||||
|
Reference in New Issue
Block a user