[open-ils-commits] r15581 - trunk/Open-ILS/web/opac/skin/default/js (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Feb 18 10:56:54 EST 2010


Author: miker
Date: 2010-02-18 10:56:51 -0500 (Thu, 18 Feb 2010)
New Revision: 15581

Modified:
   trunk/Open-ILS/web/opac/skin/default/js/rdetail.js
Log:
forward-porting r15578: Patch from Warren Layton to escape "s in hand-built JSON ... should probably build an object and call js2json against it, but this gets the job done for now

Modified: trunk/Open-ILS/web/opac/skin/default/js/rdetail.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/rdetail.js	2010-02-18 15:56:37 UTC (rev 15580)
+++ trunk/Open-ILS/web/opac/skin/default/js/rdetail.js	2010-02-18 15:56:51 UTC (rev 15581)
@@ -888,9 +888,9 @@
 	_debug('setting action clicks for cn ' + cn);
 
 	var dHref = 'javascript:rdetailVolumeDetails('+
-			'{copy_location : "'+cl+'", rowid : "'+row.id+'", cn :"'+cn+'", depth:"'+depth+'", org:"'+orgNode.id()+'", local: '+local+'});';
+			'{copy_location : "'+cl.replace(/\"/g, '\\"')+'", rowid : "'+row.id+'", cn :"'+cn.replace(/\"/g, '\\"')+'", depth:"'+depth+'", org:"'+orgNode.id()+'", local: '+local+'});';
 
-	var bHref = 'javascript:rdetailShowCNBrowse("' + cn + '", '+orgNode.id()+', "'+depth+'");'; 
+	var bHref = 'javascript:rdetailShowCNBrowse("' + cn.replace(/\"/g, '\\"') + '", '+orgNode.id()+', "'+depth+'");'; 
 
 	unHideMe( $n(row, 'details') )
 		$n(row, 'details').setAttribute('href', dHref);



More information about the open-ils-commits mailing list