Hardware: iPhone XS Max 128GB
iOS Version: 14.0
Wikipedia App Version: 6.7.0 (1757)
Description
When clicking on DOI links in references, a broken link opens in Safari that gives a "DOI Not Found" error. This is appears to be due to special characters (such as forward slashes and parentheses) being encoded twice instead of once or not at all.
Example
Take the article "Coronavirus disease 2019". As of 2020-9-17 there is a reference (Han X, et al. (March 2020)) that contains doi:10.1093/cid/ciaa271. The part 10.1093/cid/ciaa271 is a link that should open https://doi.org/10.1093/cid/ciaa271, but instead it opens https://doi.org/10.1093%252Fcid%252Fciaa271. The forward slash is replaced with %252F, demonstrating that it is being encoded twice. First, it is encoded to %2F, and then the % is encoded to %25, resulting in %252F. This occurs with parentheses as well (and probably other special characters, if used.)
Steps To Reproduce
- Open the iOS mobile app and navigate to an article with a DOI in a reference (medical-related articles are good for this.)
- Click on the identifier link that is found after its page numbers in a journal. For example, it will look something like this: 10.1093/cid/ciaa271 (I only have Safari as a browser, so I don't know if it will ask to choose a browser if you have multiple. If it does, choose Safari. You may also be able to test with other browsers then.)
- You should be taken to an error page. If you check the URL, you will notice any special characters are replaced with %25 followed by its URL code point (sans another % sign.) For example, / is replaced with %252F.
Reproduction Rate: 10/10
Additional Info
I have tested this with other external links in references and it only appears to happen with DOI links. I also tested it on the mobile site in Safari and they are fully functional. Manually unencoding characters in the link in Safari fixes it, either fully unencoding the doubly-encoded special characters by replacing %25xx with the character encoded by %xx, or undoing the 2nd encode by removing the 25 part from %25xx to form %xx.