diff options
Diffstat (limited to 'src/modules/filters/teihtmlhref.cpp')
-rw-r--r-- | src/modules/filters/teihtmlhref.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/modules/filters/teihtmlhref.cpp b/src/modules/filters/teihtmlhref.cpp index 7e27667..47bb7b9 100644 --- a/src/modules/filters/teihtmlhref.cpp +++ b/src/modules/filters/teihtmlhref.cpp @@ -55,7 +55,7 @@ TEIHTMLHREF::TEIHTMLHREF() { addAllowedEscapeString("amp"); addAllowedEscapeString("lt"); addAllowedEscapeString("gt"); - + setTokenCaseSensitive(true); } @@ -87,6 +87,8 @@ bool TEIHTMLHREF::handleToken(SWBuf &buf, const char *token, BasicFilterUserData u->lastHi = rend; if (rend == "ital") buf += "<i>"; + else if (rend == "italic") + buf += "<i>"; else if (rend == "bold") buf += "<b>"; else if (rend == "sup") @@ -97,6 +99,8 @@ bool TEIHTMLHREF::handleToken(SWBuf &buf, const char *token, BasicFilterUserData SWBuf rend = u->lastHi; if (rend == "ital") buf += "</i>"; + else if (rend == "italic") + buf += "</i>"; else if (rend == "bold") buf += "</b>"; else if (rend == "sup") @@ -138,6 +142,11 @@ bool TEIHTMLHREF::handleToken(SWBuf &buf, const char *token, BasicFilterUserData } } + // <lb.../> + else if (!strcmp(tag.getName(), "lb")) { + buf += "<br />"; + } + // <pos>, <gen>, <case>, <gram>, <number>, <mood>, <pron>, <def> else if (!strcmp(tag.getName(), "pos") || !strcmp(tag.getName(), "gen") || @@ -251,7 +260,7 @@ bool TEIHTMLHREF::handleToken(SWBuf &buf, const char *token, BasicFilterUserData if (tag.isEndTag()) { SWBuf footnoteNumber = tag.getAttribute("swordFootnote"); - buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=n&value=%s&module=%s&passage=%s\"><small><sup>*n</sup></small></a>", + buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=n&value=%s&module=%s&passage=%s\"><small><sup class=\"n\">*n</sup></small></a>", URL::encode(footnoteNumber.c_str()).c_str(), URL::encode(u->version.c_str()).c_str(), URL::encode(u->key->getText()).c_str()); |