Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 337974
Collapse All | Expand All

(-)a/runtime.rwt/org.eclipse.rap.rwt.q07/src/org/eclipse/swt/internal/widgets/tableitemkit/TableItemLCA.java (-12 / +1 lines)
Lines 174-182 public final class TableItemLCA extends AbstractWidgetLCA { Link Here
174
    boolean result = WidgetLCAUtil.hasChanged( item, PROP_TEXTS, texts );
174
    boolean result = WidgetLCAUtil.hasChanged( item, PROP_TEXTS, texts );
175
    if( result ) {
175
    if( result ) {
176
      for( int i = 0; i < texts.length; i++ ) {
176
      for( int i = 0; i < texts.length; i++ ) {
177
        // TODO [rh] for some reason doesn't work with escapeText
177
        texts[ i ] = WidgetLCAUtil.escapeText( texts[ i ], false );
178
//        texts[ i ] = WidgetLCAUtil.escapeText( item.getText( i ), false );
179
        texts[ i ] = encodeHTML( item.getText( i ) );
180
        texts[ i ] = EncodingUtil.replaceWhiteSpaces( texts[ i ] );
178
        texts[ i ] = EncodingUtil.replaceWhiteSpaces( texts[ i ] );
181
      }
179
      }
182
      JSWriter writer = JSWriter.getWriterFor( item );
180
      JSWriter writer = JSWriter.getWriterFor( item );
Lines 355-368 public final class TableItemLCA extends AbstractWidgetLCA { Link Here
355
    writer.call( "update", null );
353
    writer.call( "update", null );
356
  }
354
  }
357
355
358
  private static String encodeHTML( final String text ) {
359
    String result = text.replaceAll( "&", "&#038;" );
360
    result = result.replaceAll( "\"", "&#034;" );
361
    result = result.replaceAll( ">", "&#062;" );
362
    result = result.replaceAll( "<", "&#060;" );
363
    return result;
364
  }
365
366
  private static String toCss( final Font font ) {
356
  private static String toCss( final Font font ) {
367
    StringBuffer result = new StringBuffer();
357
    StringBuffer result = new StringBuffer();
368
    FontData fontData = font.getFontData()[ 0 ];
358
    FontData fontData = font.getFontData()[ 0 ];
369
- 

Return to bug 337974