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

Bug 373900

Summary: [Tree] TreeItems show & instead of & in IE8
Product: [RT] RAP Reporter: Chris Fairhall <chris>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: tbuschto
Version: 1.5   
Target Milestone: 1.5 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Chris Fairhall CLA 2012-03-11 19:11:51 EDT
Build Identifier: rap-runtime-1.5.0-N-20120311-0212

When showing a TreeItem with & in the text it is fine until you click the item. When you do (sometimes not until after you move the mouse away) the & is replaced by &amp;. This not only makes it look ugly but also cuts trailing text off too.



Reproducible: Always

Steps to Reproduce:
1. Create RAP Mail Demo.
2. Modify NavigationView.ViewLabelProvider to append text with an ampersand in it.
3. Run demo and click on the TreeItem
Comment 1 Ivan Furnadjiev CLA 2012-03-12 02:09:39 EDT
I can reproduce it too in IE8. This is a regression after implementing markup in Table.
Comment 2 Ivan Furnadjiev CLA 2012-03-12 04:50:01 EDT
It is reproducible with IE9 as well. TreeRow#_getVisualTextWidth calls item.getText with parameter true ( to escape the text ). This call lazily escapes the item text. After the recent IE optimizations (get use of innerText instead of innerHtml), item text should never be escaped for IE as it is done by the browser itself (when innerText is used). Probably, a proper implementation of lazy escaping is need in TreeItem#getText.
Comment 3 Tim Buschtoens CLA 2012-03-13 08:02:43 EDT
Fixed in CVS HEAD. The text to measure is now taken from the DOM where its already escaped.