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

Bug 347107

Summary: The hyperlink on the report cannot be opened, due to the wrong escape character
Product: z_Archived Reporter: Hai Feng Luo <haifengl>
Component: BIRTAssignee: Birt-Chart-inbox <Birt-Chart-inbox>
Status: NEW --- QA Contact: Xiaoying Gu <bluesoldier>
Severity: normal    
Priority: P3 CC: bluesoldier
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
the sample file none

Description Hai Feng Luo CLA 2011-05-25 02:26:33 EDT
Build Identifier: Eclipse BIRT Designer Version 2.5.2.v20100208 Build &lt;2.5.2.v20100210-0630

The hyperlink on the report cannot be opened although it has been defined on the report. The root cause is that the new line in the hyperlink definition (javascript codes) of the report will be generated as code "&amp;#13;" and this causes the hyperlink not work.  The workaround is to manually replace that with "&#13" or "&#xD". 

Reproducible: Always

Steps to Reproduce:
1. Create a chart, define the hyperlink in series part, by selecting the Event as "Mouse Click", Action as "Hyper link", and add a new hyperlink in the Hyperlinks section, input some javascript codes in the location of URL. Also define a Mouse over event ( to show tooltips)  for the report series also.
2. run the report, the hyperlink is supposed to be opened after clicking, the url defined in the URL location should be opened. But nothing happens, except the mouse over event working
3. To look into the xml source code, would find some strings like:
<BaseUrl>&lt;structure name=&quot;action&quot;>
    &lt;property name=&quot;linkType&quot;>hyperlink&lt;/property>
    &lt;expression name=&quot;uri&quot; type=&quot;javascript&quot;>if(true){&amp;#13;
&quot;http://www.google.com&quot;&amp;#13;
}&amp;#13;
else {&amp;#13;
&quot;http://www.yahoo.com&quot;&amp;#13;
}&lt;/expression>
    &lt;property name=&quot;targetWindow&quot;>_blank&lt;/property>
&lt;/structure>
</BaseUrl>
You can see that characters like &amp;#13; this is the escape char for new line in the javascript codes of hyperlink. Change it to &#13; or &#xD;. the problem will be resolved. Seems &amp;#13; is escapted from &#13; or &#xD;
Comment 1 Hai Feng Luo CLA 2011-05-25 02:28:46 EDT
Created attachment 196510 [details]
the sample file