Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335499 - [Webapp] Search result title from search processor escaped incorrectly
Summary: [Webapp] Search result title from search processor escaped incorrectly
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 M6   Edit
Assignee: Chris Goldthorpe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-26 14:25 EST by Chris Goldthorpe CLA
Modified: 2011-02-10 15:08 EST (History)
0 users

See Also:


Attachments
Search client java class illustrating the problem (2.43 KB, text/x-java)
2011-01-26 14:26 EST, Chris Goldthorpe CLA
no flags Details
Patch (1.94 KB, patch)
2011-02-10 15:06 EST, Chris Goldthorpe CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Goldthorpe CLA 2011-01-26 14:25:26 EST
I20110118-0800

If the searchClient extension point is used and the title of a search hit returns a double quote ( Search bugzilla "plugin" ) that title displays correctly in the help view but in the webapp it appears as 	Search bugzilla forquot;plugin"
Comment 1 Chris Goldthorpe CLA 2011-01-26 14:26:59 EST
Created attachment 187672 [details]
Search client java class illustrating the problem
Comment 2 Chris Goldthorpe CLA 2011-02-10 13:45:38 EST
I think this bug is unrelated to the searchClient extension and has always existed for titles containing characters that require escaping. I will look into it.
Comment 3 Chris Goldthorpe CLA 2011-02-10 14:51:31 EST
The problem only exists for potential results, and is caused by code in ServletResources which is stripping the first ampersand from the result string, this is apparently to remove keyboard accelerators although I'm not sure why those accelerators are in WebappResources.properties. For example 

SearchLabel=&Search:

Since the translations of the property files probably also contain the accelerators the best fix would be to strip the ampersands from the string that come from resources before variable substitution.
Comment 4 Chris Goldthorpe CLA 2011-02-10 15:06:44 EST
Created attachment 188721 [details]
Patch

I can see how the accelerators are intended to work. The only resources containing accelerators have no substitution parameters so the fix is to remove the code that strips out the first ampersand from the methods that return a resource which has parameter substitution.
Comment 5 Chris Goldthorpe CLA 2011-02-10 15:08:34 EST
Patch applied to HEAD, Fixed