Changeset 11947

Show
Ignore:
Timestamp:
01/03/08 22:26:35 (12 months ago)
Author:
bill
Message:

Fixes #5501: ComboBox? double-escaping HTML entities in inlined data

Location:
dijit/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • dijit/trunk/form/ComboBox.js

    r11942 r11947  
    715715                        //              FilteringSelect 
    716716 
    717                         var labelObject=labelFunc(item); 
     717                        var labelObject = labelFunc(item); 
    718718                        var menuitem = document.createElement("div"); 
    719719                        if(labelObject.html){ 
     
    968968                                                /* attribute-name-string */ attribute,  
    969969                                                /* value? */ defaultValue){ 
    970                 return attribute == "value" ? item.value : item.innerHTML; 
     970                return (attribute == "value") ? item.value : (item.innerText || item.textContent); 
    971971        }, 
    972972 
  • dijit/trunk/tests/form/test_FilteringSelect.html

    r11942 r11947  
    253253                <br> 
    254254                <hr> 
     255                <p>FilteringSelect #12: special characters</p> 
     256                <p>The drop down list should be:</p> 
     257                <ul> 
     258                   <li>sticks &amp; stones 
     259                   <li>rags --&gt; riches 
     260                </ul> 
     261                <label for="filter12">Special chars:</label> 
     262                <select dojoType="dijit.form.FilteringSelect" 
     263                        name="filter12" 
     264                        id="filter12" 
     265                > 
     266                        <option value="sticks" selected>sticks &amp; stones</option> 
     267                        <option value="rags">rags --&gt; riches</option> 
     268                </select> 
     269                <br> 
     270                <hr> 
    255271                <input type="submit"> 
    256272        </form>