projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
17093ed
)
fix escaping in coordinate links
author
Ivan Kohler
<ivan@freeside.biz>
Thu, 5 Jul 2012 23:29:49 +0000
(16:29 -0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Thu, 5 Jul 2012 23:29:49 +0000
(16:29 -0700)
httemplate/elements/coord-links.html
patch
|
blob
|
history
diff --git
a/httemplate/elements/coord-links.html
b/httemplate/elements/coord-links.html
index
60882de
..
02a224a
100644
(file)
--- 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'),
<& /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'
'width' => 763,
'height' => 575,
#'color'
@@
-13,7
+13,7
@@
<& /elements/popup_link.html,
'action' => $p. "view/directions.html?origin=$origin;". $query,
'label' => mt('directions'),
<& /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,
&>
'width' => 763,
'height' => 575,
&>
@@
-29,6
+29,12
@@
my $query = 'name='. uri_escape_utf8($name).
';lat='. $latitude.
';lon='. $longitude;
';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+$/ ) {
my $origin;
#for directions link
if ( $agentnum =~ /^\d+$/ ) {