X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fcoord-links.html;h=02a224a00124f1453e2408f962b538b0bb991f5e;hb=ce89af6a65868fd0f5cde05ef866611aacad39aa;hp=60882deed86e633b482aab3b7d3a243a9f337f00;hpb=3063fb45f35d0cb5253871a540a8f0a0efa06b5a;p=freeside.git diff --git a/httemplate/elements/coord-links.html b/httemplate/elements/coord-links.html index 60882deed..02a224a00 100644 --- a/httemplate/elements/coord-links.html +++ b/httemplate/elements/coord-links.html @@ -3,7 +3,7 @@ <& /elements/popup_link.html, 'action' => $p. 'view/map.html?'. $query, 'label' => mt('map'), - 'actionlabel' => uri_escape_utf8($name), + 'actionlabel' => $js_name, 'width' => 763, 'height' => 575, #'color' @@ -13,7 +13,7 @@ <& /elements/popup_link.html, 'action' => $p. "view/directions.html?origin=$origin;". $query, 'label' => mt('directions'), - 'actionlabel' => uri_escape_utf8($name), + 'actionlabel' => $js_name, 'width' => 763, 'height' => 575, &> @@ -29,6 +29,12 @@ my $query = 'name='. uri_escape_utf8($name). ';lat='. $latitude. ';lon='. $longitude; +my $js_name = $name; +$js_name =~ s/[<>"]/ /g; +$m->interp->apply_escapes($js_name, 'js_string'); +$js_name =~ s/^'//; +$js_name =~ s/'$//; + my $origin; #for directions link if ( $agentnum =~ /^\d+$/ ) {