[sword-svn] r403 - trunk/webapp/examples

scribe at crosswire.org scribe at crosswire.org
Fri Feb 1 03:28:40 MST 2013


Author: scribe
Date: 2013-02-01 03:28:40 -0700 (Fri, 01 Feb 2013)
New Revision: 403

Modified:
   trunk/webapp/examples/suggest.jsp
Log:
removed bug where key was being double uri encoded


Modified: trunk/webapp/examples/suggest.jsp
===================================================================
--- trunk/webapp/examples/suggest.jsp	2012-12-04 16:53:38 UTC (rev 402)
+++ trunk/webapp/examples/suggest.jsp	2013-02-01 10:28:40 UTC (rev 403)
@@ -22,7 +22,7 @@
                         for (int i = 0; ((i < 20) && (book.error() == 0)); i++) {
                                 key = book.getKeyText();
                                 retVal += (currentKey.equals(key)) ? "<li style=\"display: block; background: #C3AB7F;\">" : "<li style=\"display: block;\">";
-                                retVal += "<a href=\"#\" onclick=\"suggest('"+mod+"', encodeURIComponent('"+key+"')); return false;\">"+key+"</a></li>\n";
+                                retVal += "<a href=\"#\" onclick=\"suggest('"+mod+"', '"+key.replace("'","\\'")+"'); return false;\">"+key+"</a></li>\n";
                                 
                                 book.next();
                         }




More information about the sword-cvs mailing list