From d4922e29dbc3a57833e3b18ec7595aead6f4311f Mon Sep 17 00:00:00 2001
From: miker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Thu, 18 Feb 2010 15:56:51 +0000
Subject: [PATCH] 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
---
 Open-ILS/web/opac/skin/default/js/rdetail.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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);
-- 
2.11.0