From 1d0ff54794b5edea7cdf1d2d66710a0fa885bcc5 Mon Sep 17 00:00:00 2001 From: Teus Benschop Date: Sun, 28 Oct 2018 11:51:26 +0100 Subject: New upstream version 1.8.1 --- src/modules/filters/gbfhtmlhref.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/modules/filters/gbfhtmlhref.cpp') diff --git a/src/modules/filters/gbfhtmlhref.cpp b/src/modules/filters/gbfhtmlhref.cpp index 6df038e..723137f 100644 --- a/src/modules/filters/gbfhtmlhref.cpp +++ b/src/modules/filters/gbfhtmlhref.cpp @@ -2,7 +2,7 @@ * * gbfhtmlhref.cpp - GBF to HTML filter with hrefs * - * $Id: gbfhtmlhref.cpp 2833 2013-06-29 06:40:28Z chrislit $ + * $Id: gbfhtmlhref.cpp 3548 2017-12-10 05:11:38Z scribe $ * * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org) * CrossWire Bible Society @@ -232,19 +232,13 @@ bool GBFHTMLHREF::handleToken(SWBuf &buf, const char *token, BasicFilterUserData SWBuf type = tag.getAttribute("type"); SWBuf footnoteNumber = tag.getAttribute("swordFootnote"); SWBuf noteName = tag.getAttribute("n"); - VerseKey *vkey = NULL; - // see if we have a VerseKey * or descendant - SWTRY { - vkey = SWDYNAMIC_CAST(VerseKey, u->key); - } - SWCATCH ( ... ) { } - if (vkey) { + if (u->vkey) { // leave this special osis type in for crossReference notes types? Might thml use this some day? Doesn't hurt. //char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n'); buf.appendFormatted("*n%s ", URL::encode(footnoteNumber.c_str()).c_str(), URL::encode(u->version.c_str()).c_str(), - URL::encode(vkey->getText()).c_str(), + URL::encode(u->vkey->getText()).c_str(), (renderNoteNumbers ? URL::encode(noteName.c_str()).c_str(): "")); } u->suspendTextPassThru = true; -- cgit v1.2.3