From: miker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Thu, 18 Feb 2010 15:56:51 +0000 (+0000)
Subject: forward-porting r15578: Patch from Warren Layton to escape "s in hand-built JSON... 
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d4922e29dbc3a57833e3b18ec7595aead6f4311f;p=contrib%2FConifer.git

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

git-svn-id: svn://svn.open-ils.org/ILS/trunk@15581 dcc99617-32d9-48b4-a31d-7c20da2025e4
---

diff --git a/Open-ILS/web/opac/skin/default/js/rdetail.js b/Open-ILS/web/opac/skin/default/js/rdetail.js
index 6bd7798cb8..1bfd241236 100644
--- a/Open-ILS/web/opac/skin/default/js/rdetail.js
+++ b/Open-ILS/web/opac/skin/default/js/rdetail.js
@@ -888,9 +888,9 @@ function rdetailBuildBrowseInfo(row, cn, local, orgNode, cl) {
 	_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);