From b745315323de9f27538edac9453205ca70e6186e Mon Sep 17 00:00:00 2001 From: "Roberto C. Sanchez" Date: Sat, 29 Mar 2014 10:54:04 -0400 Subject: Imported Upstream version 1.6.2+dfsg --- src/modules/filters/thmlhtmlhref.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/modules/filters/thmlhtmlhref.cpp') diff --git a/src/modules/filters/thmlhtmlhref.cpp b/src/modules/filters/thmlhtmlhref.cpp index 83f5a80..c0887f1 100644 --- a/src/modules/filters/thmlhtmlhref.cpp +++ b/src/modules/filters/thmlhtmlhref.cpp @@ -175,21 +175,21 @@ bool ThMLHTMLHREF::handleToken(SWBuf &buf, const char *token, BasicFilterUserDat SWBuf value = tag.getAttribute("value"); if (tag.getAttribute("type") && !strcmp(tag.getAttribute("type"), "morph")) { //> if(value.length()) - buf.appendFormatted("(%s)", + buf.appendFormatted("(%s)", URL::encode(value.c_str()).c_str(), value.c_str()); } else if (tag.getAttribute("type") && !strcmp(tag.getAttribute("type"), "lemma")) { //> if(value.length()) // empty "type=" is deliberate. - buf.appendFormatted("<%s>", + buf.appendFormatted("<%s>", URL::encode(value.c_str()).c_str(), value.c_str()); } else if (tag.getAttribute("type") && !strcmp(tag.getAttribute("type"), "Strongs")) { char ch = *value; value<<1; - buf.appendFormatted("<", + buf.appendFormatted("<", ((ch == 'H') ? "Hebrew" : "Greek"), URL::encode(value.c_str()).c_str()); buf += (value.length()) ? value.c_str() : ""; @@ -215,20 +215,22 @@ bool ThMLHTMLHREF::handleToken(SWBuf &buf, const char *token, BasicFilterUserDat if (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("*%c", + buf.appendFormatted("*%c", ch, URL::encode(footnoteNumber.c_str()).c_str(), URL::encode(u->version.c_str()).c_str(), URL::encode(vkey->getText()).c_str(), + ch, ch); } else { char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n'); - buf.appendFormatted("*%c", + buf.appendFormatted("*%c", ch, URL::encode(footnoteNumber.c_str()).c_str(), URL::encode(u->version.c_str()).c_str(), URL::encode(u->key->getText()).c_str(), + ch, ch); } u->suspendTextPassThru = true; @@ -272,7 +274,7 @@ bool ThMLHTMLHREF::handleToken(SWBuf &buf, const char *token, BasicFilterUserDat if (vkey) { // leave this special osis type in for crossReference notes types? Might thml use this some day? Doesn't hurt. //buf.appendFormatted("*x ", vkey->getText(), footnoteNumber.c_str()); - buf.appendFormatted("*x", + buf.appendFormatted("*x", URL::encode(footnoteNumber.c_str()).c_str(), URL::encode(u->version.c_str()).c_str(), URL::encode(vkey->getText()).c_str()); -- cgit v1.2.3