Changeset 12397

Show
Ignore:
Timestamp:
09/20/07 13:37:12 (1 year ago)
Author:
w_i
Message:

Encoding title string so we don't get javascript errors.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/midcom.helper.datamanager2/exec/universalchooser_handler.php

    r11263 r12397  
    234234 
    235235 
    236     $title = @$object->$gotfield
     236    $title = rawurlencode(@$object->$gotfield)
    237237    debug_add("adding result: id={$id} title='{$title}' titlefield='{$gotfield}'"); 
    238238    echo "      <line>\n"; 
  • trunk/midcom/midcom.helper.datamanager2/static/universalchooser.js

    r4864 r12397  
    179179    { 
    180180        /* Render a result in the results list */ 
    181         jsCall = 'javascript:midcom_helper_datamanager2_widget_universalchooser_add_option("' + this.idsuffix + '", "' + key + '", \'' + title + '\');'; 
     181        jsCall = 'javascript:midcom_helper_datamanager2_widget_universalchooser_add_option("' + this.idsuffix + '", "' + key + '", \'' + escape(title) + '\');'; 
    182182        result_li = this.create_element('li', null, false); 
    183183        result_link = this.create_element('a',  
     
    191191        result_li.appendChild(result_link); 
    192192        this.results_ul.appendChild(result_li); 
    193         new Insertion.Top(result_link, title); 
     193        new Insertion.Top(result_link, unescape(title)); 
    194194    }, 
    195195     
     
    243243                break; 
    244244        } 
    245         html += '<label for="' + input_id + '">' + title + '</label>\n'; 
     245        html += '<label for="' + input_id + '">' + unescape(title) + '</label>\n'; 
    246246         
    247247        new Insertion.Bottom(this.fieldname + '_fieldset', html)