facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
118.36k stars 24.25k forks source link

iOS Linking escapes hash's #28508

Closed ManAnRuck closed 1 year ago

ManAnRuck commented 4 years ago

Please provide all the information requested. Issues that do not follow this format are likely to stall.

Description

When I try to link with import { Linking } from 'react-native'; an url with # on iOS the safari opens the url escaped with %23 instead of #. for example https://www.democracy-deutschland.de/#!engineering#help opens in safari https://www.democracy-deutschland.de/%23!engineering%23help

React Native version:

System:
    OS: macOS 10.15.4
    CPU: (4) x64 Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz
    Memory: 940.02 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 10.16.0 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.9.0 - ~/.nvm/versions/node/v10.16.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK:
      API Levels: 22, 23, 25, 26, 27, 28
      Build Tools: 23.0.1, 25.0.0, 25.0.1, 25.0.2, 26.0.0, 26.0.1, 26.0.2, 26.0.3, 27.0.1, 27.0.3, 28.0.3
      System Images: android-26 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-R | Google APIs Intel x86 Atom
  IDEs:
    Android Studio: 3.6 AI-192.7142.36.36.6241897
    Xcode: 11.4/11E146 - /usr/bin/xcodebuild
  npmPackages:
    react-native: 0.61.4 => 0.61.4 
  npmGlobalPackages:
    react-native-cli: 2.0.1

Steps To Reproduce

  1. Linking an url with some #
  2. check opened url in safari

Expected Results

do not escape by Linking library. or add options to handle this

Snack, code example, screenshot, or link to a repository:

https://github.com/demokratie-live/democracy-client

stale[bot] commented 4 years ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

ManAnRuck commented 4 years ago

Backlog

stale[bot] commented 3 years ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

rayliao commented 3 years ago

I got same issue

rayliao commented 3 years ago

can fix by using encodeURI

cipolleschi commented 1 year ago

We recently landed 2b4e1f5ece7d160935b19d4862af8706a44cee59 that should fix the issue.

cipolleschi commented 1 year ago

We had to back out the changes due to some internal tests failing.