my %qf= (%baseqf,%queryqf);
delete $qf{$lname};
$qf{$lname}= $value if $cvalix;
- print '<a href="',$quri->(%qf),'">';
+</%perl>
+<a href="<% $quri->(%qf) |h %>">
+<%perl>
$after= '</a>';
}
print $html, $after;
% if ($a{Query} eq 'route') {
<h1>Specify route</h1>
-<form action="<% $quri->() %>" method="get">
+<form action="<% $quri->() |h %>" method="get">
%#---------- textbox, user enters route as string ----------
% if (!$a{Dropdowns}) {
Enter route (islands, or archipelagoes, separated by |s or commas;
abbreviations are OK):<br/>
-<script type="text/javascript">
+<&| script &>
tr_uri= "routetextstring?format=json&type=text/xml"
+ "&ocean=<% uri_escape($a{Ocean}) %>";
tr_Request();
}
window.onload= tr_Needed;
-</script>
+</&script>
<input type="text" id="routestring" name="routestring" size=80
value="<% $routestring |h %>"
<input type=hidden name=dropdowns value="<% $a{Dropdowns} |h %>">
-<script type="text/javascript">
-ms_lists= <% to_json(\%resetislandlistdata) %>;
+<&| script &>
+ms_lists= <% to_json_protecttags(\%resetislandlistdata) %>;
function ms_Setarch(dd) {
debug('ms_SetArch '+dd+' arch='+arch);
var arch= document.getElementsByName('archipelago'+dd).item(0).value;
select.innerHTML= got;
debug('ms_SetArch '+dd+' arch='+arch+' innerHTML set');
}
-</script>
+</&script>
<table style="table-layout:fixed; width:90%;">
</pre>
% }
-<script type="text/javascript">
+<&| script &>
function debug (m) {
% if ($debug) {
var node= document.getElementById('debug_log');
node.innerHTML += "\n" + m + "\n";
% }
}
-</script>
+</&script>
<& footer &>
use CommodsWeb;
use HTML::Entities;
use URI::Escape;
-use JSON;
</%init>