mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-31 21:41:33 +00:00
Fixing broken BBC links which have oddball hashes.
This commit is contained in:
parent
4dc30085f8
commit
26cf69892a
1 changed files with 7 additions and 3 deletions
|
@ -568,9 +568,13 @@ NEWSBLUR.Views.StoryDetailView = Backbone.View.extend({
|
|||
|
||||
// Fix footnotes
|
||||
if (_.string.contains(href, "#")) {
|
||||
footnote_href = href.replace(/^.*?\#(.*?)$/, "\#$1")
|
||||
.replace(':', "\\\:");
|
||||
var $footnote = $(footnote_href);
|
||||
try {
|
||||
footnote_href = href.replace(/^.*?\#(.*?)$/, "\#$1")
|
||||
.replace(':', "\\\:");
|
||||
var $footnote = $(footnote_href);
|
||||
} catch (err) {
|
||||
$footnote = [];
|
||||
}
|
||||
if ($footnote.length) {
|
||||
href = footnote_href;
|
||||
var offset = $(href).offset().top;
|
||||
|
|
Loading…
Add table
Reference in a new issue