summaryrefslogtreecommitdiff
path: root/src/modules/filters/teihtmlhref.cpp
diff options
context:
space:
mode:
authorRoberto C. Sanchez <roberto@connexer.com>2014-03-29 10:54:04 -0400
committerRoberto C. Sanchez <roberto@connexer.com>2014-03-29 10:54:04 -0400
commitb745315323de9f27538edac9453205ca70e6186e (patch)
treee804cd15cf894a2a14aab6c5224bc242273dc3ba /src/modules/filters/teihtmlhref.cpp
parent936d9e8484ff73282c8c0a277310d1ffdde86e10 (diff)
Imported Upstream version 1.6.2+dfsg
Diffstat (limited to 'src/modules/filters/teihtmlhref.cpp')
-rw-r--r--src/modules/filters/teihtmlhref.cpp13
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());