EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB439273: JavaScript in Hyperlinks Failed to be executed in MicroStrategy Web 10.4 to 10.8


Community Admin

• Strategy


Users can refer to KB46036 to execute JavaScript via hyperlinks on MicroStrategy Web. However, the JavaScript is not working in MicroStrategy web 10.4 to 10.8. By checking the console of browser, we can see extra random syntax is added to the JavaScript code, which block the JavaScript code to be executed.

SYMPTOM:
Users can refer to KB46036 to execute JavaScript via hyperlinks on Strategy Web. However, the JavaScript is not working in Strategy Web 10.4 to 10.8. By checking the console of browser, an extra random syntax is added to the JavaScript code, which block the JavaScript code to be executed.
For example, user has a link with JavaScript like


javascript:alert("hi");

This will be executed as the following in presentation mode, which causes the issue.

javascript:alert("hi");mstrWeb=-*-U*-Gt6USzHS*_eqTonWcFXYdPMt6A=.Account*_Plan.*-738a7m*_hOt17lKQc_


 
STEPS TO REPRODUCE 
1) Go to Web admin page of Strategy Web 10.8, enable the option named "Allow JavaScript Execution for Report Services Documents Hyperlinks" under Security->User Input Filtering
2) Create a new RS document and insert an image
3) Right Click on Image tag and select properties and Formatting, enable Is hyperlink in General Tab.
4) Type javascript:alert("hi"); into Hyperlink text field.
5) Click OK and save the document.
6) Run the document in presentation mode, click on the image. Nothing will happen. In Strategy Web 10.3 and older, a pop up window will appear with message “hi”.
 
CAUSE:
This is a known issue in Strategy Web 10.4 to 10.8
 
ACTION:
This issue has been addressed in Strategy web 10.9 as well as 10.4 Hotfix 5. Please upgrade to these versions to take advantage of the fix.
 
WORKAROUND:
If it is not convenient to upgrade Strategy web to a version with this issue fixed, users can use the HTML container to avoid the issue.
1) Insert a HTML container to the document
2) Right mouse click on it, choose Properties and Formatting
3) Choose HTML Text in the HTML container under the General tab and click on Apply and close
4) Double click on the HTML container, Type the following syntax, modify the path of image.
<a href="javascript:alert('hi');"><img src="../images/image_name.jpg"></img></a>
5) Run in Presentation mode, click on the image and can trigger the JS function.
 


Comment

0 comments

Details

Knowledge Article

Published:

December 21, 2017

Last Updated:

December 21, 2017