[sword-cvs] sword/src/modules/filters osishtmlhref.cpp,1.24,1.25

sword at www.crosswire.org sword at www.crosswire.org
Wed Jul 21 13:11:33 MST 2004


Committed by: tbiggs

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

Modified Files:
	osishtmlhref.cpp 
Log Message:
work on reference tag

Index: osishtmlhref.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/osishtmlhref.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- osishtmlhref.cpp	21 Jul 2004 16:49:03 -0000	1.24
+++ osishtmlhref.cpp	21 Jul 2004 20:11:31 -0000	1.25
@@ -198,11 +198,15 @@
 
 		// <reference> tag
 		else if (!strcmp(tag.getName(), "reference")) {
-			if ((!tag.isEndTag()) && (!tag.isEmpty())) {
-				buf += "<a href=\"\">";
+			if (!tag.isEmpty()) {
+				u->suspendTextPassThru = true;
 			}
-			else if (tag.isEndTag()) {
-				buf += "</a>";
+			if (tag.isEndTag()) {
+				SWBuf refList = u->lastTextNode;
+				buf.appendFormatted("&nbsp<a href=\"passagestudy.jsp?action=showRef&type=reference&value=%s\">%s</a>&nbsp",
+					(refList.length()) ? URL::encode(refList.c_str()).c_str() : "",
+					(u->lastTextNode.length()) ? u->lastTextNode.c_str() : "");
+				u->suspendTextPassThru = false;
 			}
 		}
 



More information about the sword-cvs mailing list