forked from extern/egroupware
html-encoding is done in etemplate engine
This commit is contained in:
parent
11f7673408
commit
c8aa72039f
@ -27,7 +27,7 @@ class etemplate_widget_taglist extends etemplate_widget
|
|||||||
public function __construct($xml = '')
|
public function __construct($xml = '')
|
||||||
{
|
{
|
||||||
$this->attrs['allowFreeEntries'] = true;
|
$this->attrs['allowFreeEntries'] = true;
|
||||||
|
|
||||||
if($xml) {
|
if($xml) {
|
||||||
parent::__construct($xml);
|
parent::__construct($xml);
|
||||||
}
|
}
|
||||||
@ -43,17 +43,17 @@ class etemplate_widget_taglist extends etemplate_widget
|
|||||||
$query = $_REQUEST['query'];
|
$query = $_REQUEST['query'];
|
||||||
$options = array();
|
$options = array();
|
||||||
$links = egw_link::query($app, $query, $options);
|
$links = egw_link::query($app, $query, $options);
|
||||||
|
|
||||||
$results = array();
|
$results = array();
|
||||||
foreach($links as $id => $name)
|
foreach($links as $id => $name)
|
||||||
{
|
{
|
||||||
$results[] = array('id'=>$id, 'label' => htmlspecialchars($name));
|
$results[] = array('id' => $id, 'label' => $name);
|
||||||
}
|
}
|
||||||
header('Content-Type: application/json; charset=utf-8');
|
header('Content-Type: application/json; charset=utf-8');
|
||||||
echo json_encode($results);
|
echo json_encode($results);
|
||||||
common::egw_exit();
|
common::egw_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search for emails
|
* Search for emails
|
||||||
*
|
*
|
||||||
@ -66,11 +66,11 @@ class etemplate_widget_taglist extends etemplate_widget
|
|||||||
$_REQUEST['app'] = 'addressbook-email';
|
$_REQUEST['app'] = 'addressbook-email';
|
||||||
return self::ajax_search();
|
return self::ajax_search();
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: this should go to a BO, not a UI object
|
// TODO: this should go to a BO, not a UI object
|
||||||
return mail_compose::ajax_searchAddress();
|
return mail_compose::ajax_searchAddress();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate input
|
* Validate input
|
||||||
*
|
*
|
||||||
@ -88,7 +88,7 @@ class etemplate_widget_taglist extends etemplate_widget
|
|||||||
{
|
{
|
||||||
$value = $value_in = self::get_array($content, $form_name);
|
$value = $value_in = self::get_array($content, $form_name);
|
||||||
$allowed = etemplate_widget_menupopup::selOptions($form_name);
|
$allowed = etemplate_widget_menupopup::selOptions($form_name);
|
||||||
|
|
||||||
foreach((array) $value as $key => $val)
|
foreach((array) $value as $key => $val)
|
||||||
{
|
{
|
||||||
if(!$this->attrs['allowFreeEntries'] && !array_key_exists($val,$allowed))
|
if(!$this->attrs['allowFreeEntries'] && !array_key_exists($val,$allowed))
|
||||||
|
@ -161,7 +161,8 @@ var et2_taglist = et2_selectbox.extend(
|
|||||||
editable: !(this.options.disabled || this.options.readonly),
|
editable: !(this.options.disabled || this.options.readonly),
|
||||||
selectionRenderer: jQuery.proxy(this.options.tagRenderer || this.selectionRenderer,this),
|
selectionRenderer: jQuery.proxy(this.options.tagRenderer || this.selectionRenderer,this),
|
||||||
renderer: jQuery.proxy(this.options.listRenderer || this.selectionRenderer,this),
|
renderer: jQuery.proxy(this.options.listRenderer || this.selectionRenderer,this),
|
||||||
maxSelection: this.options.maxSelection
|
maxSelection: this.options.maxSelection,
|
||||||
|
highlight: false // otherwise renderer have to return strings
|
||||||
}, this.lib_options);
|
}, this.lib_options);
|
||||||
this.taglist = this.taglist.magicSuggest(options);
|
this.taglist = this.taglist.magicSuggest(options);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user