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
|
// Fix footnotes
|
||||||
if (_.string.contains(href, "#")) {
|
if (_.string.contains(href, "#")) {
|
||||||
footnote_href = href.replace(/^.*?\#(.*?)$/, "\#$1")
|
try {
|
||||||
.replace(':', "\\\:");
|
footnote_href = href.replace(/^.*?\#(.*?)$/, "\#$1")
|
||||||
var $footnote = $(footnote_href);
|
.replace(':', "\\\:");
|
||||||
|
var $footnote = $(footnote_href);
|
||||||
|
} catch (err) {
|
||||||
|
$footnote = [];
|
||||||
|
}
|
||||||
if ($footnote.length) {
|
if ($footnote.length) {
|
||||||
href = footnote_href;
|
href = footnote_href;
|
||||||
var offset = $(href).offset().top;
|
var offset = $(href).offset().top;
|
||||||
|
|
Loading…
Add table
Reference in a new issue