Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363380 - [Textile] markup editor preview fails when & and ; on the same line
Summary: [Textile] markup editor preview fails when & and ; on the same line
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.6.0   Edit
Assignee: David Green CLA
QA Contact: David Green CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-09 15:44 EST by Shawn Minto CLA
Modified: 2012-02-28 13:13 EST (History)
0 users

See Also:


Attachments
mylyn/context/zip (3.16 KB, application/octet-stream)
2011-11-09 16:11 EST, David Green CLA
no flags Details
screenshot showing result of fix (2.98 KB, image/png)
2011-11-17 00:32 EST, David Green CLA
no flags Details
mylyn/context/zip (16.19 KB, application/octet-stream)
2011-11-17 00:32 EST, David Green CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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