Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347107 - The hyperlink on the report cannot be opened, due to the wrong escape character
Summary: The hyperlink on the report cannot be opened, due to the wrong escape character
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Birt-Chart-inbox@eclipse.org CLA
QA Contact: Xiaoying Gu CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-25 02:26 EDT by Hai Feng Luo CLA
Modified: 2011-05-30 03:55 EDT (History)
1 user (show)

See Also:


Attachments
the sample file (38.58 KB, application/octet-stream)
2011-05-25 02:28 EDT, Hai Feng Luo CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hai Feng Luo CLA 2011-05-25 02:26:33 EDT
Build Identifier: Eclipse BIRT Designer Version 2.5.2.v20100208 Build <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 "
" 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