[sword-cvs] sword/src/modules/filters thmlhtmlhref.cpp,1.51,1.52

sword at www.crosswire.org sword at www.crosswire.org
Wed Jul 21 18:33:02 MST 2004


Committed by: tbiggs

Update of /cvs/core/sword/src/modules/filters
In directory www:/tmp/cvs-serv26052

Modified Files:
	thmlhtmlhref.cpp 
Log Message:
added encode to more prams

Index: thmlhtmlhref.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/thmlhtmlhref.cpp,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- thmlhtmlhref.cpp	21 Jul 2004 16:48:24 -0000	1.51
+++ thmlhtmlhref.cpp	22 Jul 2004 01:33:00 -0000	1.52
@@ -54,18 +54,21 @@
 		if (tag.getName() && !strcmp(tag.getName(), "sync")) {
 			SWBuf value = tag.getAttribute("value");
 			if (tag.getAttribute("type") && !strcmp(tag.getAttribute("type"), "morph")) { //>
-				buf.appendFormatted("<small><em>(<a href=\"passagestudy.jsp?action=showMorph&type=Greek&value=%s\">", (value.length()) ? value.c_str() : "");
-				buf += (value.length()) ? value.c_str() : "";
-				buf += "</a>) </em></small>";
+				if(value.length())
+					buf.appendFormatted("<small><em>(<a href=\"passagestudy.jsp?action=showMorph&type=Greek&value=%s\">*s</a>) </em></small>", 
+						URL::encode(value.c_str()).c_str(),
+						value.c_str());
 			}
 			else if (tag.getAttribute("type") && !strcmp(tag.getAttribute("type"), "Strongs")) {
 				if(*value == 'H') {
 					value<<1;
-					buf.appendFormatted("<small><em>&lt;<a href=\"passagestudy.jsp?action=showStrongs&type=Hebrew&value=%s\">",(value.length()) ? value.c_str() : "");
+					buf.appendFormatted("<small><em>&lt;<a href=\"passagestudy.jsp?action=showStrongs&type=Hebrew&value=%s\">",
+						URL::encode(value.c_str()).c_str());
 				}
 				else if(*value == 'G') {
 					value<<1;
-					buf.appendFormatted("<small><em>&lt;<a href=\"passagestudy.jsp?action=showStrongs&type=Greek&value=%s\">",(value.length()) ? value.c_str() : "");
+					buf.appendFormatted("<small><em>&lt;<a href=\"passagestudy.jsp?action=showStrongs&type=Greek&value=%s\">",
+						URL::encode(value.c_str()).c_str());
 				}
 				buf += (value.length()) ? value.c_str() : "";
 				buf += "</a>&gt; </em></small>";



More information about the sword-cvs mailing list