Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

ابحث في الدعم

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

#-links (citations on wikipedia) in reader view don't work properly.

  • 2 (ردّان اثنان)
  • 1 has this problem
  • 1 view
  • آخر ردّ كتبه cor-el

more options

In Reader View, when clicking #-links, as in links that makes you jump to somewhere else on the page, firefox doesn't open the link properly.

For example, the citation https://en.wikipedia.org/wiki/Cley_Marshes#cite_note-NAE9-1 on https://en.wikipedia.org/wiki/Cley_Marshes becomes https://en.wikipedia.org/wiki/#cite_note-NAE9-1 and thus, clicking the link redirects me to https://en.wikipedia.org/wiki/Main_Page#cite_note-NAE9-1 instead of jumping down to the citation on the page, neither in reader view or normally.

I have the same problem on another site which uses #-links as footnotes. On http://www.baka-tsuki.org/project/index.php?title=Mushoku_Tensei:Web_Chapter_67 the footnote http://www.baka-tsuki.org/project/index.php?title=Mushoku_Tensei:Web_Chapter_67#cite_note-1 becomes http://www.baka-tsuki.org/project/#cite_note-1 and thus redirects to http://www.baka-tsuki.org/project/index.php?title=Main_Page#cite_note-1 instead of jumping down the page.

I suspect it has something to do with how #-links are coded, but I don't know.

Is this a bug, and is there anything I can do to fix this?

Any help would be greatly appreciated.

Thanks in advance.

In Reader View, when clicking #-links, as in links that makes you jump to somewhere else on the page, firefox doesn't open the link properly. For example, the citation https://en.wikipedia.org/wiki/Cley_Marshes#cite_note-NAE9-1 on https://en.wikipedia.org/wiki/Cley_Marshes becomes https://en.wikipedia.org/wiki/#cite_note-NAE9-1 and thus, clicking the link redirects me to https://en.wikipedia.org/wiki/Main_Page#cite_note-NAE9-1 instead of jumping down to the citation on the page, neither in reader view or normally. I have the same problem on another site which uses #-links as footnotes. On http://www.baka-tsuki.org/project/index.php?title=Mushoku_Tensei:Web_Chapter_67 the footnote http://www.baka-tsuki.org/project/index.php?title=Mushoku_Tensei:Web_Chapter_67#cite_note-1 becomes http://www.baka-tsuki.org/project/#cite_note-1 and thus redirects to http://www.baka-tsuki.org/project/index.php?title=Main_Page#cite_note-1 instead of jumping down the page. I suspect it has something to do with how #-links are coded, but I don't know. Is this a bug, and is there anything I can do to fix this? Any help would be greatly appreciated. Thanks in advance.

All Replies (2)

more options

I have seen this before in bug, however I do not have an eta for when this will change.

Please add your vote to this bug. There might also be a duplicate bug, but I could not find it.

Modified by guigs

more options

It looks that this version of processing a link isn't covered by the code.

So it uses pathBase + uri where uri is the relative link (href="#cite_note-NAE9-1")

207   _fixRelativeUris: function(articleContent) {
208     var scheme = this._uri.scheme;
209     var prePath = this._uri.prePath;
210     var pathBase = this._uri.pathBase;
211
212     function toAbsoluteURI(uri) {
213       // If this is already an absolute URI, return it.
214       if (/^[a-zA-Z][a-zA-Z0-9\+\-\.]*:/.test(uri))
215         return uri;
216 
217       // Scheme-rooted relative URI.
218       if (uri.substr(0, 2) == "//")
219         return scheme + "://" + uri.substr(2);
220 
221       // Prepath-rooted relative URI.
222       if (uri[0] == "/")
223         return prePath + uri;
224 
225       // Dotslash relative URI.
226       if (uri.indexOf("./") === 0)
227         return pathBase + uri.slice(2);
228 
229       // Standard relative URI; add entire path. pathBase already includes a
230       // trailing "/".
231       return pathBase + uri;
232     }