[sword-svn] r3592 - trunk/src/modules/filters

scribe at crosswire.org scribe at crosswire.org
Sat Jul 21 11:08:20 MST 2018


Author: scribe
Date: 2018-07-21 11:08:20 -0700 (Sat, 21 Jul 2018)
New Revision: 3592

Modified:
   trunk/src/modules/filters/osisxhtml.cpp
Log:
Fixed bug which outputted a milestone <span> which apparently isn't allow in html.  While fixing this, added all attribute information for mystery milestones

Modified: trunk/src/modules/filters/osisxhtml.cpp
===================================================================
--- trunk/src/modules/filters/osisxhtml.cpp	2018-07-10 14:30:00 UTC (rev 3591)
+++ trunk/src/modules/filters/osisxhtml.cpp	2018-07-21 18:08:20 UTC (rev 3592)
@@ -520,8 +520,15 @@
 			
 			
 			else {
-				SWBuf type = tag.getAttribute("type");
-				outText(SWBuf("<span class=\"") + type + "\"/>", buf,u);
+				SWBuf attVal = tag.getAttribute("type");
+				outText(SWBuf("<span class=\"") + attVal + "\"", buf,u);
+				StringList attributes =  tag.getAttributeNames();
+				for (StringList::const_iterator it = attributes.begin(); it != attributes.end(); ++it) {
+					attVal = tag.getAttribute(*it);
+					outText(SWBuf(" data-") + *it + "=\"" + attVal + "\"", buf,u);
+				}
+				outText(SWBuf("></span>"), buf,u);
+				
 			}
 		}
 




More information about the sword-cvs mailing list