Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 364545

Summary: Encode \t in html
Product: z_Archived Reporter: Matthias Fischer <mfi>
Component: ScoutAssignee: Project Inbox <scout.core-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bsi.msa
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Matthias Fischer CLA 2011-11-23 04:02:10 EST
Build Identifier: M20110210-1200

If i create a tab with ctrl+tab in a table string column, the tab is not shown correctly in html.

Reproducible: Always

Steps to Reproduce:
1. go to string column
2. enter "a", ctrl+tab, "b" and focus another cell
3. tab is shown as space, not as tab

Solution:
Replace a tab "\t" with "<span style=\"white-space:pre\">&#9;</span>" in the htmlEncode (StringUtility) method. Also check the functionality in the htmlDecode method.
Comment 1 Daniel Wiehl CLA 2011-11-24 08:44:47 EST
Problem:
In table cells, tabulators are not rendered correctly namely as non-breaking spaces.
Solution:
Tabs are only to be interpreted as real tabs in multiline tables. If non-HTML text is content of a cell, its content is encoded to be printed as HTML.
>In StringUtility#htmlEncode, tabs are to be converted into HTML tabs in the form of <span style=\"white-space:pre\">&#9;</span>
>In StringUtility#htmlDecode, HTML tabs and HTML breaks are to be converted into \t and \n, respectively.
Migration: None
Status: Fixed
Comment 2 Matthias Fischer CLA 2011-11-24 10:08:32 EST
Test OK
Comment 3 Matthias Zimmermann CLA 2012-07-09 06:49:06 EDT
ticket closed.
deliverd as part of eclipse scout 3.8.0 (juno release train)
Comment 4 Judith Gull CLA 2013-01-01 06:22:59 EST
*** Bug 347254 has been marked as a duplicate of this bug. ***