Changeset 332
- Timestamp:
- 2007-05-29 11:03:38 (17 months ago)
- Location:
- FCKeditor/trunk
- Files:
-
- 3 modified
-
editor/dialog/fck_select/fck_select.js (modified) (3 diffs)
-
editor/dialog/fck_select.html (modified) (1 diff)
-
_whatsnew.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/trunk/editor/dialog/fck_select/fck_select.js
r132 r332 62 62 var oTxtValue = document.getElementById( "txtValue" ) ; 63 63 64 oListText.options[ iIndex ].innerHTML = oTxtText.value;64 oListText.options[ iIndex ].innerHTML = HTMLEncode( oTxtText.value ) ; 65 65 oListText.options[ iIndex ].value = oTxtText.value ; 66 66 67 oListValue.options[ iIndex ].innerHTML = oTxtValue.value;67 oListValue.options[ iIndex ].innerHTML = HTMLEncode( oTxtValue.value ) ; 68 68 oListValue.options[ iIndex ].value = oTxtValue.value ; 69 69 … … 116 116 117 117 var oOption = combo.options[ iActualIndex ] ; 118 var sText = oOption.innerHTML;118 var sText = HTMLDecode( oOption.innerHTML ) ; 119 119 var sValue = oOption.value ; 120 120 … … 163 163 combo.options.add( oOption ) ; 164 164 165 oOption.innerHTML = optionText.length > 0 ? optionText: ' ' ;165 oOption.innerHTML = optionText.length > 0 ? HTMLEncode( optionText ) : ' ' ; 166 166 oOption.value = optionValue ; 167 167 168 168 return oOption ; 169 169 } 170 171 function HTMLEncode( text ) 172 { 173 if ( !text ) 174 return '' ; 175 176 text = text.replace( /&/g, '&' ) ; 177 text = text.replace( /</g, '<' ) ; 178 text = text.replace( />/g, '>' ) ; 179 180 return text ; 181 } 182 183 184 function HTMLDecode( text ) 185 { 186 if ( !text ) 187 return '' ; 188 189 text = text.replace( />/g, '>' ) ; 190 text = text.replace( /</g, '<' ) ; 191 text = text.replace( /&/g, '&' ) ; 192 193 return text ; 194 } -
FCKeditor/trunk/editor/dialog/fck_select.html
r308 r332 59 59 for ( var i = 0 ; i < oActiveEl.options.length ; i++ ) 60 60 { 61 var sText = oActiveEl.options[i].innerHTML;61 var sText = HTMLDecode( oActiveEl.options[i].innerHTML ) ; 62 62 var sValue = oActiveEl.options[i].value ; 63 63 -
FCKeditor/trunk/_whatsnew.html
r329 r332 108 108 form had a button named "submit" the "Save" command didn't work in Firefox.</li> 109 109 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/414">#414</a>] If tracing was 110 globally enabled in Asp.net 2 then the Asp.Net connector did fail.</li> 110 globally enabled in Asp.Net 2.0 then the Asp.Net connector did fail.</li> 111 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/520">#520</a>] The "Select 112 Field" properties dialog was not correctly handling select options with &, < 113 and >.</li> 111 114 </ul> 112 115 <h3>