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

Bug 363380

Summary: [Textile] markup editor preview fails when & and ; on the same line
Product: z_Archived Reporter: Shawn Minto <shawn.minto>
Component: MylynAssignee: David Green <greensopinion>
Status: RESOLVED FIXED QA Contact: David Green <greensopinion>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 1.6.0   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
mylyn/context/zip
none
screenshot showing result of fix
none
mylyn/context/zip none

Description Shawn Minto CLA 2011-11-09 15:44:12 EST
When you have both a & and ; on the same line, the textile preview does not work anymore.

# see this starts with a hash instead of a number
Comment 1 David Green CLA 2011-11-09 16:11:43 EST
There are two aspects to this bug:
* & and ; on the same line were sometimes incorrectly detected as an HTML entity reference even if there were spaces between them
* an unknown entity reference such as @&foobar;@ would cause unpredictable text presentation behaviour

I've pushed a fix for the first problem.  The second issue will require further investigation.
Comment 2 David Green CLA 2011-11-09 16:11:44 EST
Created attachment 206737 [details]
mylyn/context/zip
Comment 3 David Green CLA 2011-11-17 00:12:59 EST
created review http://review.mylyn.org/#change,110
Comment 4 David Green CLA 2011-11-17 00:32:02 EST
Created attachment 207121 [details]
screenshot showing result of fix

fix applied: @HtmlDocumentBuilder@ can now filter entity references so that entity names are converted to numeric entities, and unrecognized entities are emitted as characters instead.  This makes it possible to safely use HTML entities in a @MarkupViewer@, and unknown entity references won't break markup rendering.
Comment 5 David Green CLA 2011-11-17 00:32:54 EST
Fixed
Comment 6 David Green CLA 2011-11-17 00:32:58 EST
Created attachment 207122 [details]
mylyn/context/zip