Nick-The-Uncharted / tablefilter-swing

Automatically exported from code.google.com/p/tablefilter-swing
1 stars 1 forks source link

HTML cell contents are incorrectly rendered in the filter #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a JTable with some HTML cell contents. For example: "<html><b>bold 
text"
2. Notice that the cell displays the cell contents correctly (i.e., as a bold 
text in this example). This is because JTables accept HTML strings, just as in 
other Swing components.
3. Apply a filter with auto choices to this table

What is the expected output? What do you see instead?
The filter displays the data as "\<html><b>bold text" instead of rendering it 
as an HTML-formatted label. This makes the filter ugly and unusable for any 
table column that contains HTML contents.

What version of the product are you using? On what operating system?
4.2.0 on JVM 1.6.0u17, WinXP

Please provide any additional information below.
Notice that if I use CustomChoices instead of the AutoChoices, then the HTML 
string *does* render as expected (i.e., with all the relevant HTML formatting).

Original issue reported on code.google.com by altm...@gmail.com on 12 Dec 2011 at 3:55

GoogleCodeExporter commented 9 years ago
Hi,

Yep, I see the problem; the reason why the filter displays it as '\<html>....' 
is because when it is evaluated, without the initial backslash it would 
interpretate it as the minus operator.

In addition, the default filter works as a regular expression matcher, so it is 
totally oblivious to html content -would work in most of the cases, anyway.

I will check how to better implement it,

Cheers,

  Lu.  

Original comment by coderazzi on 17 Dec 2011 at 9:12

GoogleCodeExporter commented 9 years ago
Fixed on release 4.3.0

Original comment by coderazzi on 16 Jan 2012 at 10:44