diff options
author | Ivan Kohler <ivan@freeside.biz> | 2012-07-05 16:29:48 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2012-07-05 16:29:48 -0700 |
commit | d18cf10c30afa6dce46c31cb87a1733202518cb8 (patch) | |
tree | e4f4e6b2b1d399921cb19b3bb00b433f84377c21 | |
parent | 840d76586528a4f4335d1b8138378d8fa9a42aff (diff) |
fix escaping in coordinate links
-rw-r--r-- | httemplate/elements/coord-links.html | 10 |
1 files changed, 8 insertions, 2 deletions
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+$/ ) { |