html-encoding is done in etemplate engine

This commit is contained in:
Ralf Becker 2013-08-09 11:17:30 +00:00
parent 11f7673408
commit c8aa72039f
2 changed files with 9 additions and 8 deletions

View File

@ -47,7 +47,7 @@ class etemplate_widget_taglist extends etemplate_widget
$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);

View File

@ -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);