Den här webbplatsen har begränsad funktionalitet medan vi utför underhåll för att förbättra din upplevelse. Om en artikel inte löser ditt problem och du vill ställa en fråga har vi vår gemenskap som väntar på att hjälpa dig på @FirefoxSupport på Twitter, /r/firefox på Reddit.

Sök i support

Akta dig för supportbedrägerier: Vi kommer aldrig att be dig att ringa eller skicka ett sms till ett telefonnummer eller dela personlig information. Rapportera misstänkt aktivitet med alternativet "Rapportera missbruk".

Läs mer

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

  • 2 svar
  • 1 har detta problem
  • 3 visningar
  • Senaste svar av 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.

Alla svar (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.

Ändrad av 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     }