Acknowledged
over 1 year ago

Bug: Communications.openWebpage removes hash # from url

Using the following line of code:

            Communications.openWebPage(url, params, options);

With a var url of the form  'https://www.example.com/sub#'

And a var params of the form { param1 => 'value1' }

And a var options of the form {}

On the phone, a notification will show to open the url 'https://www.example.com/sub#', but when clicked, the url that will be in the browser is actually 'https://www.example.com/sub/?param1='value1'.

In other words, the # is removed when the url is sent to the browser (tried many browsers like Chrome, Firefox, etc, and multiple Android versions up to Android 14).

Can this be fixed? Or is there a workaround that will keep the hash in the url?

Parents
  • Thanks for your response! You are right that in the case of downloading a page to the watch, it would not matter. The # part (fragment identifier) is indeed not sent to the server.

    However, in this case I am sending the url to the phone to open it in the browser. This webpage is using the fragment in the javascript indeed, and without it, the javascript is missing information and does not work as intended.

Comment
  • Thanks for your response! You are right that in the case of downloading a page to the watch, it would not matter. The # part (fragment identifier) is indeed not sent to the server.

    However, in this case I am sending the url to the phone to open it in the browser. This webpage is using the fragment in the javascript indeed, and without it, the javascript is missing information and does not work as intended.

Children
No Data