mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 17:04:14 +01:00
xajax uses xml to transport the label, therefore we have to replace not only CR, LF (not allowed unencoded in Javascript strings) but also all utf-8 C0 and C1 plus CR and LF
This commit is contained in:
parent
81f2d510f9
commit
4d325a63d3
@ -634,7 +634,9 @@ class link_widget
|
||||
foreach($found as $id => $option)
|
||||
{
|
||||
if (!is_array($option)) $option = array('label' => $option);
|
||||
$option['label'] = str_replace(array("\r","\n"),array(" "," "),$option['label']);
|
||||
// xajax uses xml to transport the label, therefore we have to replace not only CR, LF
|
||||
// (not allowed unencoded in Javascript strings) but also all utf-8 C0 and C1 plus CR and LF
|
||||
$option['label'] = preg_replace('/[\000-\037\177-\237]/u',' ',$option['label']);
|
||||
$script .= "opt = select.options[select.options.length] = new Option('".addslashes($option['label'])."','".addslashes($id)."');\n";
|
||||
if (count($option) > 1)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user