X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fcoord-links.html;h=02a224a00124f1453e2408f962b538b0bb991f5e;hb=ded0ab5cac02f099b387de360fb6dd6bd8cbb6b4;hp=81af8120b5dd75739e0f94270785d242231cdcd0;hpb=7dd79523c75c3cd238fb1c0cb7ccb346a6569811;p=freeside.git diff --git a/httemplate/elements/coord-links.html b/httemplate/elements/coord-links.html index 81af8120b..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' => $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' => $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+$/ ) {