Sure! I have a document from the developers that I will paste below. If more info is needed, just let me know and I'll do my best to help.
Problem: CSH Links don't work in Microsoft Edge due to pound (#) sign
Cause: Microsoft Edge views local files which contain a # sign and are opened through API as a potential threat. As a result, it removes the # and any characters following. This is only an issue for files which meet the following criteria: 1) Are local, 2) Are opened through Windows API, 3) Contain the # sign.
Easy Solution: Host HTML5 help on a web server
[unfortunately, not an option for us]
Less Easy Solution: Trick Microsoft.
Overview: We determined an alternate approach was necessary to "convince" Edge to open CSH files. Our approach was to create a temporary HTML file with the offending URL written inside the HTML file itself. When the customer calls for CSH, the software creates a temporary HTML file. The temporary file contains the URL, and redirects to the correct page. Since the API call occurs
before the link is passed to Edge, the # is not removed.
Sample temporary HTML file:
Code: Select all
<html>
<meta http-equiv=Refresh content="0; url=file:///C:/myFile Name.htm#101">
<body></body>
</html>
Process:
1. Get the file name plus path where you want to create the temporary html file. For example: MyTempFile = ‘C:/myTempFile.html’.
2. If MyTempFile exists, then delete it.
3. Create a new MyTempFile.
4. Get the content to be written to the HTML file. You may need to build the string with your specific ID to be passed. For example:
Code: Select all
'<html><meta http-equiv=Refresh content="0; url=file:///C:/myFile Name.htm#' + CovertIntToStr(myID) + ' "><body></body></html>'
5. Write this string to the MyTempFile HTML file.
6. Close the file so that it can be opened by other processes.
7. Use any of the Widows APIs to open this MyTempFile file. I used ShellExecute to simply open the file:
Code: Select all
ShellExecute(0, 'OPEN', PChar(MyTempFile), '', '', SW_SHOWNORMAL).
8. The code inside the MyTempFile takes care of redirecting it to the correct URL.