From: Christian Weiske Date: Fri, 1 Apr 2011 06:17:01 +0000 (+0200) Subject: make popup bookmarklet work in firefox when the title contains double and single... X-Git-Tag: v0.98.0~96 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=43974a15f24859fd817adccb6c906522748ce42d;p=semanticscuttle.git make popup bookmarklet work in firefox when the title contains double and single quotes. opera still broken, though --- diff --git a/data/templates/editbookmark.tpl.php b/data/templates/editbookmark.tpl.php index 8b98987..1a74290 100644 --- a/data/templates/editbookmark.tpl.php +++ b/data/templates/editbookmark.tpl.php @@ -20,6 +20,10 @@ function jsEscTitle($title) { return addcslashes($title, "'"); } +function jsEscTitleDouble($title) +{ + return addcslashes(addcslashes($title, "'"), "'\\"); +} if (is_array($row['tags'])) { $row['tags'] = implode(', ', $row['tags']); @@ -261,7 +265,7 @@ if (browser == "Opera") { + 't=encodeURIComponent(x.title);' + 'd=encodeURIComponent('+selection+');' + 'open(' - + '\'?action=add&popup=1&address=\'+a+\'&title=\'+t+\'&description=\'+d,\'\',\'modal=1,status=0,scrollbars=1,toolbar=0,resizable=1,width=790,height=465,left=\'+(screen.width-790)/2+\',top=\'+(screen.height-425)/2' + + '\'?action=add&popup=1&address=\'+a+\'&title=\'+t+\'&description=\'+d,\'\',\'modal=1,status=0,scrollbars=1,toolbar=0,resizable=1,width=790,height=465,left=\'+(screen.width-790)/2+\',top=\'+(screen.height-425)/2' + ');void 0;">' + '' + ''