summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/views/about.erb6
-rw-r--r--web/views/download.erb16
-rw-r--r--web/views/help/keyboard.erb42
-rw-r--r--web/views/help/search.erb10
-rw-r--r--web/views/index.erb28
-rw-r--r--web/views/key.erb48
-rw-r--r--web/views/keys.erb4
-rw-r--r--web/views/layout.erb18
-rw-r--r--web/views/not_found.erb4
-rw-r--r--web/views/relation.erb26
-rw-r--r--web/views/relations.erb2
-rw-r--r--web/views/reports/characters_in_keys.erb20
-rw-r--r--web/views/reports/database_statistics.erb12
-rw-r--r--web/views/reports/index.erb6
-rw-r--r--web/views/reports/josm_styles.erb2
-rw-r--r--web/views/reports/language_comparison_table_for_keys_in_the_wiki.erb10
-rw-r--r--web/views/reports/languages.erb2
-rw-r--r--web/views/reports/name_tags.erb12
-rw-r--r--web/views/reports/wiki_pages_about_non_existing_keys.erb2
-rw-r--r--web/views/search.erb22
-rw-r--r--web/views/search_tags.erb6
-rw-r--r--web/views/sources.erb12
-rw-r--r--web/views/tag.erb38
-rw-r--r--web/views/tags.erb4
-rw-r--r--web/viewsjs/key.js.erb48
-rw-r--r--web/viewsjs/keys.js.erb22
-rw-r--r--web/viewsjs/relation.js.erb24
-rw-r--r--web/viewsjs/relations.js.erb14
-rw-r--r--web/viewsjs/reports/characters_in_keys.js.erb32
-rw-r--r--web/viewsjs/reports/frequently_used_keys_without_wiki_page.js.erb14
-rw-r--r--web/viewsjs/reports/josm_styles.js.erb12
-rw-r--r--web/viewsjs/reports/key_lengths.js.erb16
-rw-r--r--web/viewsjs/reports/language_comparison_table_for_keys_in_the_wiki.js.erb6
-rw-r--r--web/viewsjs/reports/languages.js.erb10
-rw-r--r--web/viewsjs/reports/name_tags.js.erb8
-rw-r--r--web/viewsjs/reports/wiki_pages_about_non_existing_keys.js.erb6
-rw-r--r--web/viewsjs/search.js.erb30
-rw-r--r--web/viewsjs/tag.js.erb36
-rw-r--r--web/viewsjs/tags.js.erb14
39 files changed, 322 insertions, 322 deletions
diff --git a/web/views/about.erb b/web/views/about.erb
index ea3d09c..4ffde59 100644
--- a/web/views/about.erb
+++ b/web/views/about.erb
@@ -1,10 +1,10 @@
<table class="boxes" width="100%">
<tr>
- <td><h2><%= t.taginfo.about %></h2></td>
+ <td><h2><%= h(t.taginfo.about) %></h2></td>
<td rowspan="4" width="20"></td>
- <td width="232"><h2><%= t.taginfo.sources %></h2></td>
+ <td width="232"><h2><%= h(t.taginfo.sources) %></h2></td>
<td rowspan="2" width="20"></td>
- <td width="232"><h2><%= t.taginfo.contact %></h2></td>
+ <td width="232"><h2><%= h(t.taginfo.contact) %></h2></td>
</tr>
<tr>
<td class="box">
diff --git a/web/views/download.erb b/web/views/download.erb
index cf87a52..27ac3a1 100644
--- a/web/views/download.erb
+++ b/web/views/download.erb
@@ -1,20 +1,20 @@
<div class="pre">
- <h1 class="section"><%= t.taginfo.download %></h1>
+ <h1 class="section"><%= h(t.taginfo.download) %></h1>
<%= t.pages.download.intro %>
</div>
<div class="box resize">
<table class="list">
<tr>
- <th class="tl"><%= t.pages.download.file %></th>
- <th class="tr"><%= t.pages.download.packed %></th>
- <th class="tr"><%= t.pages.download.unpacked %></th>
- <th class="tl"><%= t.pages.download.description %></th>
+ <th class="tl"><%= h(t.pages.download.file) %></th>
+ <th class="tr"><%= h(t.pages.download.packed) %></th>
+ <th class="tr"><%= h(t.pages.download.unpacked) %></th>
+ <th class="tl"><%= h(t.pages.download.description) %></th>
</tr>
<tr>
<td class="tl"><a rel="nofollow" href="/download/taginfo-master.db.bz2">taginfo-master.db.bz2</a></td>
- <td class="tr"><%= File.size("../../download/taginfo-master.db.bz2").to_bytes rescue "<span class='empty'>#{ t.misc.unknown }</span>" %></td>
- <td class="tr"><%= File.size("../../data/taginfo-master.db").to_bytes rescue "<span class='empty'>#{ t.misc.unknown }</span>" %></td>
- <td class="tl"><%= t.sources.master.description %></td>
+ <td class="tr"><%= File.size("../../download/taginfo-master.db.bz2").to_bytes rescue "<span class='empty'>#{ h(t.misc.unknown) }</span>" %></td>
+ <td class="tr"><%= File.size("../../data/taginfo-master.db").to_bytes rescue "<span class='empty'>#{ h(t.misc.unknown) }</span>" %></td>
+ <td class="tl"><%= h(t.sources.master.description) %></td>
</tr>
<% Source.visible.each_with_index do |source, n| c = (n%2==0) ? ' even' : '' %>
<tr>
diff --git a/web/views/help/keyboard.erb b/web/views/help/keyboard.erb
index 0ac37dc..f9bf40c 100644
--- a/web/views/help/keyboard.erb
+++ b/web/views/help/keyboard.erb
@@ -1,45 +1,45 @@
<table class="help_table">
<tr>
- <th><%= t.help.keyboard.site_navigation %></th>
- <th><%= t.help.keyboard.page_navigation %></th>
- <th><%= t.help.keyboard.table_navigation %></th>
+ <th><%= h(t.help.keyboard.site_navigation) %></th>
+ <th><%= h(t.help.keyboard.page_navigation) %></th>
+ <th><%= h(t.help.keyboard.table_navigation) %></th>
</tr>
<tr>
- <td><span class="key">h</span> - <%= t.help.keyboard.home_page %></td>
- <td><span class="key">?</span> - <%= t.help.keyboard.help_page %></td>
- <td><span class="key"><%= t.help.keyboard.keys.home %></span> - <%= t.help.keyboard.first_page %></td>
+ <td><span class="key">h</span> - <%= h(t.help.keyboard.home_page) %></td>
+ <td><span class="key">?</span> - <%= h(t.help.keyboard.help_page) %></td>
+ <td><span class="key"><%= h(t.help.keyboard.keys.home) %></span> - <%= h(t.help.keyboard.first_page) %></td>
</tr>
- <td><span class="key">k</span> - <%= t.help.keyboard.keys_page %></td>
- <td><span class="key">s</span> - <%= t.help.keyboard.activate_search %></td>
- <td><span class="key"><%= t.help.keyboard.keys.pageup %></span> - <%= t.help.keyboard.prev_page %></td>
+ <td><span class="key">k</span> - <%= h(t.help.keyboard.keys_page) %></td>
+ <td><span class="key">s</span> - <%= h(t.help.keyboard.activate_search) %></td>
+ <td><span class="key"><%= h(t.help.keyboard.keys.pageup) %></span> - <%= h(t.help.keyboard.prev_page) %></td>
<tr>
- <td><span class="key">t</span> - <%= t.help.keyboard.tags_page %></td>
- <td><span class="key"><%= t.help.keyboard.keys.tab %></span> - <%= t.help.keyboard.switch_input %></td>
- <td><span class="key"><%= t.help.keyboard.keys.pagedown %></span> - <%= t.help.keyboard.next_page %></td>
+ <td><span class="key">t</span> - <%= h(t.help.keyboard.tags_page) %></td>
+ <td><span class="key"><%= h(t.help.keyboard.keys.tab) %></span> - <%= h(t.help.keyboard.switch_input) %></td>
+ <td><span class="key"><%= h(t.help.keyboard.keys.pagedown) %></span> - <%= h(t.help.keyboard.next_page) %></td>
</tr>
<tr>
- <td><span class="key">r</span> - <%= t.help.keyboard.relations_page %></td>
- <td><span class="key">1</span> - <span class="key">9</span> - <%= t.help.keyboard.switch_tab %></td>
- <td><span class="key"><%= t.help.keyboard.keys.end %></span> - <%= t.help.keyboard.last_page %></td>
+ <td><span class="key">r</span> - <%= h(t.help.keyboard.relations_page) %></td>
+ <td><span class="key">1</span> - <span class="key">9</span> - <%= h(t.help.keyboard.switch_tab) %></td>
+ <td><span class="key"><%= h(t.help.keyboard.keys.end) %></span> - <%= h(t.help.keyboard.last_page) %></td>
</tr>
<tr>
- <td><span class="key">&larr;</span> - <%= t.help.keyboard.up %></td>
- <td><span class="key"><%= t.help.keyboard.keys.esc %></span> - <%= t.help.keyboard.deactivate %></td>
- <td><span class="key">&uarr;</span> - <%= t.help.keyboard.prev_entry %></td>
+ <td><span class="key">&larr;</span> - <%= h(t.help.keyboard.up) %></td>
+ <td><span class="key"><%= h(t.help.keyboard.keys.esc) %></span> - <%= h(t.help.keyboard.deactivate) %></td>
+ <td><span class="key">&uarr;</span> - <%= h(t.help.keyboard.prev_entry) %></td>
</tr>
<tr>
<td></td>
<td></td>
- <td><span class="key">&darr;</span> - <%= t.help.keyboard.next_entry %></td>
+ <td><span class="key">&darr;</span> - <%= h(t.help.keyboard.next_entry) %></td>
</tr>
<tr>
<td></td>
<td></td>
- <td><span class="key">&rarr;</span> - <%= t.help.keyboard.enter_entry %></td>
+ <td><span class="key">&rarr;</span> - <%= h(t.help.keyboard.enter_entry) %></td>
</tr>
<tr>
<td></td>
<td></td>
- <td><span class="key">f</span> - <%= t.help.keyboard.activate_filter %></td>
+ <td><span class="key">f</span> - <%= h(t.help.keyboard.activate_filter) %></td>
</tr>
</table>
diff --git a/web/views/help/search.erb b/web/views/help/search.erb
index 5c0dac9..ba6ed69 100644
--- a/web/views/help/search.erb
+++ b/web/views/help/search.erb
@@ -1,14 +1,14 @@
-<p><b><%= t.help.search.intro %></b></p>
+<p><b><%= h(t.help.search.intro) %></b></p>
<table class="help_table">
<tr><td width="50%">
- <p><%= t.help.search.string %>:</p>
+ <p><%= h(t.help.search.string) %>:</p>
<p class="search">highway</p>
- <p><%= t.help.search.substring %>:</p>
+ <p><%= h(t.help.search.substring) %>:</p>
<p class="search">way</p>
</td><td width="50%">
- <p><%= t.help.search.complete_tags %>:</p>
+ <p><%= h(t.help.search.complete_tags) %>:</p>
<p class="search">highway=residential</p>
- <p><%= t.help.search.values_only %>:</p>
+ <p><%= h(t.help.search.values_only) %>:</p>
<p class="search">=residential</p>
</td></tr>
</table>
diff --git a/web/views/index.erb b/web/views/index.erb
index 80a872e..0c986df 100644
--- a/web/views/index.erb
+++ b/web/views/index.erb
@@ -1,17 +1,17 @@
<table class="boxes resize" width="100%">
<tr>
- <td width="232" height="40"><h2><a href="/keys"><%= t.osm.keys %></a></h2></td>
+ <td width="232" height="40"><h2><a href="/keys"><%= h(t.osm.keys) %></a></h2></td>
<td rowspan="6" width="20"></td>
- <td height="40"><h2><%= t.pages.index.popular_keys %></h2></td>
+ <td height="40"><h2><%= h(t.pages.index.popular_keys) %></h2></td>
<td rowspan="6" width="20"></td>
- <td width="232" height="40"><h2><a href="/reports"><%= t.taginfo.reports %></a></h2></td>
+ <td width="232" height="40"><h2><a href="/reports"><%= h(t.taginfo.reports) %></a></h2></td>
<td rowspan="6" width="20"></td>
- <td width="232" height="40"><h2><a href="/about"><%= t.taginfo.about %></a></h2></td>
+ <td width="232" height="40"><h2><a href="/about"><%= h(t.taginfo.about) %></a></h2></td>
</tr>
<tr>
<td class="box">
<div id="key_list"></div>
- <div class="emphasis" style="margin: 10px 0 0 0;"><a href="/keys"><%= t.pages.index.keys.listkeys %></a></div>
+ <div class="emphasis" style="margin: 10px 0 0 0;"><a href="/keys"><%= h(t.pages.index.keys.listkeys) %></a></div>
</td>
<td rowspan="5" class="box">
<div id="tagcloud" style="margin: 15px 0; line-height: 200%; text-align: justify; overflow: hidden;"></div>
@@ -20,37 +20,37 @@
<p><%= t.pages.reports.intro %></p>
<ul style="margin: 0 0 0 18px; padding: 0;">
<% Report.each_visible do |report| %>
- <li><a href="<%= report.url %>"><%= t.reports[report.name].name %></a></li>
+ <li><a href="<%= report.url %>"><%= h(t.reports[report.name].name) %></a></li>
<% end %>
</ul>
- <p class="emphasis" style="margin-top: 20px;"><a href="/reports"><%= t.pages.index.reports.listreports %></a></p>
+ <p class="emphasis" style="margin-top: 20px;"><a href="/reports"><%= h(t.pages.index.reports.listreports) %></a></p>
</td>
<td rowspan="3" class="box">
<%= t.pages.index.about.intro %>
- <p class="emphasis" style="margin-top: 20px;"><a href="/about"><%= t.pages.index.about.more %></a></p>
+ <p class="emphasis" style="margin-top: 20px;"><a href="/about"><%= h(t.pages.index.about.more) %></a></p>
</td>
</tr>
<tr>
- <td height="40"><h2><a href="/tags"><%= t.osm.tags %></a></h2></td>
+ <td height="40"><h2><a href="/tags"><%= h(t.osm.tags) %></a></h2></td>
</tr>
<tr>
<td class="box">
<div id="tag_list"></div>
- <div class="emphasis" style="margin: 10px 0 0 0;"><a href="/tags"><%= t.pages.index.tags.listtags %></a></div>
+ <div class="emphasis" style="margin: 10px 0 0 0;"><a href="/tags"><%= h(t.pages.index.tags.listtags) %></a></div>
</td>
</tr>
<tr>
- <td height="40"><h2><a href="/relations"><%= t.osm.relation_types %></a></h2></td>
- <td height="40"><h2><%= t.taginfo.international %></h2></td>
+ <td height="40"><h2><a href="/relations"><%= h(t.osm.relation_types) %></a></h2></td>
+ <td height="40"><h2><%= h(t.taginfo.international) %></h2></td>
</tr>
<tr>
<td class="box">
<div id="relation_list"></div>
- <div class="emphasis" style="margin: 10px 0 0 0;"><a href="/relations"><%= t.pages.index.relations.listrelations %></a></div>
+ <div class="emphasis" style="margin: 10px 0 0 0;"><a href="/relations"><%= h(t.pages.index.relations.listrelations) %></a></div>
</td>
<td class="box">
<p><%= TaginfoConfig.get('instance.description') %></p>
- <p class="emphasis" style="margin-top: 20px;"><a class="extlink" href="http://wiki.openstreetmap.org/wiki/Taginfo/Sites"><%= t.pages.index.international.see %></a></p>
+ <p class="emphasis" style="margin-top: 20px;"><a class="extlink" href="http://wiki.openstreetmap.org/wiki/Taginfo/Sites"><%= h(t.pages.index.international.see) %></a></p>
</td>
</tr>
</table>
diff --git a/web/views/key.erb b/web/views/key.erb
index 3e8a20e..465227d 100644
--- a/web/views/key.erb
+++ b/web/views/key.erb
@@ -1,11 +1,11 @@
<div class="pre">
<form id="filter-form">
- <label for="filter"><%= t.pages.key.filter.label %></label>
+ <label for="filter"><%= h(t.pages.key.filter.label) %></label>
<select id="filter" name="filter">
- <option value="all"<%= @sel['all'] %>><%= t.pages.key.filter.none %></option>
- <option value="nodes"<%= @sel['nodes'] %>><%= t.pages.key.filter.nodes %></option>
- <option value="ways"<%= @sel['ways'] %>><%= t.pages.key.filter.ways %></option>
- <option value="relations"<%= @sel['relations'] %>><%= t.pages.key.filter.relations %></option>
+ <option value="all"<%= @sel['all'] %>><%= h(t.pages.key.filter.none) %></option>
+ <option value="nodes"<%= @sel['nodes'] %>><%= h(t.pages.key.filter.nodes) %></option>
+ <option value="ways"<%= @sel['ways'] %>><%= h(t.pages.key.filter.ways) %></option>
+ <option value="relations"<%= @sel['relations'] %>><%= h(t.pages.key.filter.relations) %></option>
</select>
</form>
<div id="tools" class="no-print">
@@ -21,16 +21,16 @@
</div>
<div id="tabs">
<ul class="no-print">
- <li><a href="#overview"><%= t.taginfo.overview %></a></li>
- <li><a href="#values"><%= t.osm.values %></a></li>
- <li><a href="#combinations"><%= t.taginfo.key_combinations %></a></li>
- <li><a href="#map"><%= t.taginfo.map %></a></li>
- <li><a href="#wiki"><%= t.sources.wiki.name %></a></li>
- <li><a href="#josm"><%= t.sources.josm.name %></a></li>
+ <li><a href="#overview"><%= h(t.taginfo.overview) %></a></li>
+ <li><a href="#values"><%= h(t.osm.values) %></a></li>
+ <li><a href="#combinations"><%= h(t.taginfo.key_combinations) %></a></li>
+ <li><a href="#map"><%= h(t.taginfo.map) %></a></li>
+ <li><a href="#wiki"><%= h(t.sources.wiki.name) %></a></li>
+ <li><a href="#josm"><%= h(t.sources.josm.name) %></a></li>
</ul>
<div id="overview">
<div style="float: right; text-align: center; padding-left: 20px;">
- <p><%= t.pages.key.overview.distribution_of_values %></p>
+ <p><%= h(t.pages.key.overview.distribution_of_values) %></p>
<div class="canvas" id="canvas-values"></div>
</div>
<% if @image_url %>
@@ -38,25 +38,25 @@
<img src="<%= @image_url %>" alt=""/>
</div>
<% end %>
- <h2><%= t.taginfo.overview %></h2>
+ <h2><%= h(t.taginfo.overview) %></h2>
<table id="grid-overview">
</table>
- <p><span title="<%= t.pages.key.overview.no_endorsement %>" tipsy="n"><%= t.pages.key.overview.objects_last_edited_by(@user_count.to_s_with_ts) %></span></p>
+ <p><span title="<%= h(t.pages.key.overview.no_endorsement) %>" tipsy="n"><%= h(t.pages.key.overview.objects_last_edited_by(@user_count.to_s_with_ts)) %></span></p>
</div>
<div id="values">
- <h2><%= t.pages.key.values_used %></h2>
+ <h2><%= h(t.pages.key.values_used) %></h2>
<div>
<table id="grid-values">
</table>
</div>
</div>
<div id="combinations">
- <h2><%= t.pages.key.other_keys_used.title %></h2>
+ <h2><%= h(t.pages.key.other_keys_used.title) %></h2>
<table id="grid-keys">
</table>
</div>
<div id="map">
- <h2><%= t.pages.key.geographic_distribution.title %></h2>
+ <h2><%= h(t.pages.key.geographic_distribution.title) %></h2>
<% if @filter_type == 'all' %>
<div style="background-image: url(<%= TaginfoConfig.get('geodistribution.background_image') %>); background-repeat: no-repeat; background-position: 1px 1px;"/>
<img class="map" src="/api/4/key/distribution/nodes?key=<%= @key_uri %>" alt="" width="<%= @img_width %>" height="<%= @img_height %>" style="position: absolute;"/>
@@ -71,23 +71,23 @@
<img class="map" src="/api/4/key/distribution/ways?key=<%= @key_uri %>" alt="" width="<%= @img_width %>" height="<%= @img_height %>"/>
</div>
<% elsif @filter_type == 'relations' %>
- <p class="empty"><%= t.pages.key.geographic_distribution.relations %></p>
+ <p class="empty"><%= h(t.pages.key.geographic_distribution.relations) %></p>
<% end %>
</div>
<div id="wiki">
- <h2><%= t.pages.key.wiki_pages.title %></h2>
+ <h2><%= h(t.pages.key.wiki_pages.title) %></h2>
<% if @wiki_count > 0 %>
<table id="grid-wiki">
</table>
<% else %>
- <p class="empty"><%= t.pages.key.wiki_pages.none_found %></p>
- <p><a class="extlink" target="_blank" rel="nofollow" href="http://wiki.openstreetmap.org/w/index.php?action=edit&title=Key:<%= @key_uri %>"><%= t.pages.key.wiki_pages.create %></a></p>
+ <p class="empty"><%= h(t.pages.key.wiki_pages.none_found) %></p>
+ <p><a class="extlink" target="_blank" rel="nofollow" href="http://wiki.openstreetmap.org/w/index.php?action=edit&title=Key:<%= @key_uri %>"><%= h(t.pages.key.wiki_pages.create) %></a></p>
<% end %>
</div>
<div id="josm">
- <h2><%= t.pages.key.josm.title %></h2>
+ <h2><%= h(t.pages.key.josm.title) %></h2>
<!-- <form>
- <label for="josm-style"><%= t.pages.key.josm.choice %></label>
+ <label for="josm-style"><%= h(t.pages.key.josm.choice) %></label>
<select id="josm-style" name="josm-style">
<option>Standard</option>
</select>
@@ -96,7 +96,7 @@
<table id="grid-josm">
</table>
<% else %>
- <p class="empty"><%= t.pages.key.josm.no_styles %></p>
+ <p class="empty"><%= h(t.pages.key.josm.no_styles) %></p>
<% end %>
</div>
</div>
diff --git a/web/views/keys.erb b/web/views/keys.erb
index a187deb..b153070 100644
--- a/web/views/keys.erb
+++ b/web/views/keys.erb
@@ -1,6 +1,6 @@
<div class="pre">
- <h1 class="section"><%= t.osm.keys %></h1>
- <p><%= t.pages.keys.intro %></p>
+ <h1 class="section"><%= h(t.osm.keys) %></h1>
+ <p><%= h(t.pages.keys.intro) %></p>
</div>
<div class="box resize">
<table id="grid-keys">
diff --git a/web/views/layout.erb b/web/views/layout.erb
index b725d61..0c9e321 100644
--- a/web/views/layout.erb
+++ b/web/views/layout.erb
@@ -12,13 +12,13 @@
</head>
<body>
<div id="header">
- <div id="header_date" title="<%= t.taginfo.data_from_description %>" tipsy="ne"><%= t.taginfo.data_from %>: <%= @data_until %> UTC</div>
+ <div id="header_date" title="<%= h(t.taginfo.data_from_description) %>" tipsy="ne"><%= h(t.taginfo.data_from) %>: <%= @data_until %> UTC</div>
<div id="header_forms" class="no-print">
<form id="set_language" action="/switch_locale">
<input type="hidden" id="url" name="url" value="<%= TaginfoConfig.get('instance.url') + request.path %>"/>
<select id="locale" name="locale">
<% r18n.available_locales.sort{ |a,b| a.title <=> b.title }.each do |locale| %>
- <option value="<%= locale.code %>"<%= locale.code == r18n.locale.code ? ' selected="selected"' : ''%>><%= locale.title %></option>
+ <option value="<%= locale.code %>"<%= locale.code == r18n.locale.code ? ' selected="selected"' : ''%>><%= h(locale.title) %></option>
<% end %>
</select>
</form>
@@ -41,18 +41,18 @@
<div id="footer_left"><a class="extlink" href="http://www.openstreetmap.org/"><b>OpenStreetMap</b> - The Free Wiki World Map</a> &middot;
<a href="http://www.openstreetmap.org/copyright">Data &copy; OpenStreetMap contributors (ODbL)</a></div>
<div id="footer_right">
- <a href="/keys"><%= t.osm.keys %></a> &middot; <a href="/tags"><%= t.osm.tags %></a> &middot; <a href="/relations"><%= t.osm.relations %></a> &middot;
- <a href="/reports"><%= t.taginfo.reports %></a> &middot; <a href="/sources"><%= t.taginfo.sources %></a> &middot;
- <a href="/download"><%= t.taginfo.download %></a> &middot; <a href="/about"><%= t.taginfo.about %></a> &middot;
- <a id="help_link" href="#help"><%= t.misc.help %></a> &middot;
- <a class="extlink" href="http://wiki.openstreetmap.org/wiki/Taginfo"><%= t.taginfo.wiki %></a>
+ <a href="/keys"><%= h(t.osm.keys) %></a> &middot; <a href="/tags"><%= h(t.osm.tags) %></a> &middot; <a href="/relations"><%= h(t.osm.relations) %></a> &middot;
+ <a href="/reports"><%= h(t.taginfo.reports) %></a> &middot; <a href="/sources"><%= h(t.taginfo.sources) %></a> &middot;
+ <a href="/download"><%= h(t.taginfo.download) %></a> &middot; <a href="/about"><%= h(t.taginfo.about) %></a> &middot;
+ <a id="help_link" href="#help"><%= h(t.misc.help) %></a> &middot;
+ <a class="extlink" href="http://wiki.openstreetmap.org/wiki/Taginfo"><%= h(t.taginfo.wiki) %></a>
</div>
</div>
<div id="javascriptmsg">This website only works with Javascript! Please enable Javascript in your browser.</div>
<div id="help"><div id="help_tabs">
<ul>
- <li><a href="/help/search"><%= t.help.search.title %></a></li>
- <li><a href="/help/keyboard"><%= t.help.keyboard.title %></a></li>
+ <li><a href="/help/search"><%= h(t.help.search.title) %></a></li>
+ <li><a href="/help/keyboard"><%= h(t.help.keyboard.title) %></a></li>
</ul>
</div></div>
</body>
diff --git a/web/views/not_found.erb b/web/views/not_found.erb
index 8820387..900517d 100644
--- a/web/views/not_found.erb
+++ b/web/views/not_found.erb
@@ -1,4 +1,4 @@
<div class="box resize" style="text-align: center">
- <h1 class="section" style="font-size: 260%; margin: 40px 0;">404 <%= t.pages.not_found.title %></h1>
- <%= t.pages.not_found.intro %>
+ <h1 class="section" style="font-size: 260%; margin: 40px 0;">404 <%= h(t.pages.not_found.title) %></h1>
+ <%= h(t.pages.not_found.intro) %>
</div>
diff --git a/web/views/relation.erb b/web/views/relation.erb
index 089100c..fdbf149 100644
--- a/web/views/relation.erb
+++ b/web/views/relation.erb
@@ -12,10 +12,10 @@
</div>
<div id="tabs">
<ul>
- <li><a href="#overview"><%= t.pages.relation.overview.tab %></a></li>
- <li><a href="#roles"><%= t.pages.relation.roles.tab %></a></li>
- <li><a href="#graph"><%= t.pages.relation.graph.tab %></a></li>
- <li><a href="#wiki"><%= t.sources.wiki.name %></a></li>
+ <li><a href="#overview"><%= h(t.pages.relation.overview.tab) %></a></li>
+ <li><a href="#roles"><%= h(t.pages.relation.roles.tab) %></a></li>
+ <li><a href="#graph"><%= h(t.pages.relation.graph.tab) %></a></li>
+ <li><a href="#wiki"><%= h(t.sources.wiki.name) %></a></li>
</ul>
<div id="overview">
<% if @image_url %>
@@ -23,37 +23,37 @@
<img src="<%= @image_url %>" alt=""/>
</div>
<% end %>
- <h2><%= t.pages.relation.overview.title %></h2>
+ <h2><%= h(t.pages.relation.overview.title) %></h2>
<table id="grid-overview">
</table>
- <p><%= t.pages.relation.overview.see_also %>: type=<span id="taglink"></span></p>
+ <p><%= h(t.pages.relation.overview.see_also) %>: type=<span id="taglink"></span></p>
</div>
<div id="roles">
- <h2><%= t.pages.relation.roles.title %></h2>
+ <h2><%= h(t.pages.relation.roles.title) %></h2>
<% if @count_relation_roles > 0 %>
<table id="grid-roles">
</table>
<% else %>
- <p class="empty"><%= t.pages.relation.roles.no_roles_info %></p>
+ <p class="empty"><%= h(t.pages.relation.roles.no_roles_info) %></p>
<% end %>
</div>
<div id="graph">
- <h2><%= t.pages.relation.graph.title %></h2>
+ <h2><%= h(t.pages.relation.graph.title) %></h2>
<% if @count_relation_roles > 0 %>
<div class="canvas">
</div>
<% else %>
- <p class="empty"><%= t.pages.relation.roles.no_roles_info %></p>
+ <p class="empty"><%= h(t.pages.relation.roles.no_roles_info) %></p>
<% end %>
</div>
<div id="wiki">
- <h2><%= t.pages.relation.wiki_pages.title %></h2>
+ <h2><%= h(t.pages.relation.wiki_pages.title) %></h2>
<% if @wiki_count > 0 %>
<table id="grid-wiki">
</table>
<% else %>
- <p class="empty"><%= t.pages.relation.wiki_pages.none_found %></p>
- <p><a class="extlink" target="_blank" rel="nofollow" href="http://wiki.openstreetmap.org/w/index.php?action=edit&title=Relation:<%= @rtype_uri %>"><%= t.pages.relation.wiki_pages.create %></a></p>
+ <p class="empty"><%= h(t.pages.relation.wiki_pages.none_found) %></p>
+ <p><a class="extlink" target="_blank" rel="nofollow" href="http://wiki.openstreetmap.org/w/index.php?action=edit&title=Relation:<%= @rtype_uri %>"><%= h(t.pages.relation.wiki_pages.create) %></a></p>
<% end %>
</div>
</div>
diff --git a/web/views/relations.erb b/web/views/relations.erb
index 663f24d..8f8cbcb 100644
--- a/web/views/relations.erb
+++ b/web/views/relations.erb
@@ -1,5 +1,5 @@
<div class="pre">
- <h1 class="section"><%= t.pages.relations.name %></h1>
+ <h1 class="section"><%= h(t.pages.relations.name) %></h1>
<p><%= t.pages.relations.intro %></p>
</div>
<div class="box resize">
diff --git a/web/views/reports/characters_in_keys.erb b/web/views/reports/characters_in_keys.erb
index 9b1cba3..4403969 100644
--- a/web/views/reports/characters_in_keys.erb
+++ b/web/views/reports/characters_in_keys.erb
@@ -1,22 +1,22 @@
<div class="pre">
- <h1><%= t.reports.characters_in_keys.name %></h1>
+ <h1><%= h(t.reports.characters_in_keys.name) %></h1>
<%= t.reports.characters_in_keys.intro %>
</div>
<div id="tabs">
<ul>
- <li><a href="#statistics"><%= t.reports.characters_in_keys.statistics.tab %></a></li>
- <li><a href="#whitespace"><span style="background-color: #d62727;">&nbsp;&nbsp;&nbsp;</span> <%= t.reports.characters_in_keys.whitespace.tab %></a></li>
- <li><a href="#problematic"><span style="background-color: #ff9896;">&nbsp;&nbsp;&nbsp;</span> <%= t.reports.characters_in_keys.problematic.tab %></a></li>
+ <li><a href="#statistics"><%= h(t.reports.characters_in_keys.statistics.tab) %></a></li>
+ <li><a href="#whitespace"><span style="background-color: #d62727;">&nbsp;&nbsp;&nbsp;</span> <%= h(t.reports.characters_in_keys.whitespace.tab) %></a></li>
+ <li><a href="#problematic"><span style="background-color: #ff9896;">&nbsp;&nbsp;&nbsp;</span> <%= h(t.reports.characters_in_keys.problematic.tab) %></a></li>
</ul>
<div id="statistics">
- <h2><%= t.reports.characters_in_keys.statistics.title %></h2>
+ <h2><%= h(t.reports.characters_in_keys.statistics.title) %></h2>
<div class="canvas boxpre" id="canvas" style="margin: 20px 0;"></div>
<table class="list">
<tr>
<th>&nbsp;</th>
- <th class="tr"><%= t.misc.count %></th>
- <th class="tr"><%= t.reports.characters_in_keys.statistics.fraction %></th>
- <th class="tl"><%= t.reports.characters_in_keys.statistics.characters %></th>
+ <th class="tr"><%= h(t.misc.count) %></th>
+ <th class="tr"><%= h(t.reports.characters_in_keys.statistics.fraction) %></th>
+ <th class="tl"><%= h(t.reports.characters_in_keys.statistics.characters) %></th>
</tr>
<% letter='A'
colors = { :A => '#2ca02c', :B => '#98df8a', :C => '#dbdb8d', :D => '#d62728', :E => '#ff9896', :F => '#aec7e8' }
@@ -37,7 +37,7 @@
</table>
</div>
<div id="whitespace">
- <h2><%= t.reports.characters_in_keys.whitespace.title %></h2>
+ <h2><%= h(t.reports.characters_in_keys.whitespace.title) %></h2>
<div class="boxpre">
<%= t.reports.characters_in_keys.whitespace.intro %>
</div>
@@ -45,7 +45,7 @@
</table>
</div>
<div id="problematic">
- <h2><%= t.reports.characters_in_keys.problematic.title %></h2>
+ <h2><%= h(t.reports.characters_in_keys.problematic.title) %></h2>
<div class="boxpre">
<%= t.reports.characters_in_keys.problematic.intro %>
</div>
diff --git a/web/views/reports/database_statistics.erb b/web/views/reports/database_statistics.erb
index 19b84ac..6c101c6 100644
--- a/web/views/reports/database_statistics.erb
+++ b/web/views/reports/database_statistics.erb
@@ -1,10 +1,10 @@
-<h1><%= t.reports.database_statistics.name %></h1>
+<h1><%= h(t.reports.database_statistics.name) %></h1>
<table class="boxes">
<tr>
- <td><h2><img class="icon_large" src="/img/types/all.20.png" alt=""/> <%= t.osm.objects %></h2></td>
+ <td><h2><img class="icon_large" src="/img/types/all.20.png" alt=""/> <%= h(t.osm.objects) %></h2></td>
<td rowspan="4" width="20"></td>
- <td><h2><img class="icon_large" src="/img/types/tag.20.png" alt=""/> <%= t.osm.tags %></h2></td>
+ <td><h2><img class="icon_large" src="/img/types/tag.20.png" alt=""/> <%= h(t.osm.tags) %></h2></td>
<td rowspan="4" width="20"></td>
<td></td>
</tr>
@@ -24,9 +24,9 @@
<td></td>
</tr>
<tr>
- <td><h2><img class="icon_large" src="/img/types/node.20.png" alt=""/> <%= t.osm.nodes %></h2></td>
- <td><h2><img class="icon_large" src="/img/types/way.20.png" alt=""/> <%= t.osm.ways %></h2></td>
- <td><h2><img class="icon_large" src="/img/types/relation.20.png" alt=""/> <%= t.osm.relations %></h2></td>
+ <td><h2><img class="icon_large" src="/img/types/node.20.png" alt=""/> <%= h(t.osm.nodes) %></h2></td>
+ <td><h2><img class="icon_large" src="/img/types/way.20.png" alt=""/> <%= h(t.osm.ways) %></h2></td>
+ <td><h2><img class="icon_large" src="/img/types/relation.20.png" alt=""/> <%= h(t.osm.relations) %></h2></td>
</tr>
<tr>
<td class="box">
diff --git a/web/views/reports/index.erb b/web/views/reports/index.erb
index 1bd6e8b..1acd99e 100644
--- a/web/views/reports/index.erb
+++ b/web/views/reports/index.erb
@@ -1,9 +1,9 @@
<div class="pre">
- <h1 class="section"><%= t.taginfo.reports %></h1>
- <p><%= t.pages.reports.intro %></p>
+ <h1 class="section"><%= h(t.taginfo.reports) %></h1>
+ <p><%= h(t.pages.reports.intro) %></p>
</div>
<div class="box resize">
- <h2><%= t.pages.reports.list %></h2>
+ <h2><%= h(t.pages.reports.list) %></h2>
<table class="list">
<tr><th class="tc" colspan="<%= Source.visible.size %>"/><%= t.pages.reports.data_sources %></th><th class="tl"><%= t.taginfo.report %></th></tr>
<% Report.each_visible_with_index do |report, n| c = (n%2!=0) ? ' even' : '' %>
diff --git a/web/views/reports/josm_styles.erb b/web/views/reports/josm_styles.erb
index 83279f0..22e7a7a 100644
--- a/web/views/reports/josm_styles.erb
+++ b/web/views/reports/josm_styles.erb
@@ -1,5 +1,5 @@
<div class="pre">
- <h1><%= t.reports.josm_styles.name %></h1>
+ <h1><%= h(t.reports.josm_styles.name) %></h1>
<!--
Select style:
<select>
diff --git a/web/views/reports/language_comparison_table_for_keys_in_the_wiki.erb b/web/views/reports/language_comparison_table_for_keys_in_the_wiki.erb
index 9b0f58e..6b81119 100644
--- a/web/views/reports/language_comparison_table_for_keys_in_the_wiki.erb
+++ b/web/views/reports/language_comparison_table_for_keys_in_the_wiki.erb
@@ -1,14 +1,14 @@
<div class="pre">
- <h1><%= t.reports.language_comparison_table_for_keys_in_the_wiki.name %></h1>
+ <h1><%= h(t.reports.language_comparison_table_for_keys_in_the_wiki.name) %></h1>
<%= t.reports.language_comparison_table_for_keys_in_the_wiki.intro %>
</div>
<div class="box resize">
<table id="grid-keys">
</table>
<table class="boxpre">
- <tr><td><img width="16" height="16" src="/img/sources/wiki/wiki-t.png" alt="[t]"/></td><td><%= t.reports.language_comparison_table_for_keys_in_the_wiki.icons.template %></td></tr>
- <tr><td><img width="16" height="16" src="/img/sources/wiki/wiki-e.png" alt="[e]"/></td><td><%= t.reports.language_comparison_table_for_keys_in_the_wiki.icons.error %></td></tr>
- <tr><td><img width="16" height="16" src="/img/sources/wiki/wiki-p.png" alt="[p]"/></td><td><%= t.reports.language_comparison_table_for_keys_in_the_wiki.icons.page %></td></tr>
- <tr><td><img width="16" height="16" src="/img/sources/wiki/wiki-r.png" alt="[r]"/></td><td><%= t.reports.language_comparison_table_for_keys_in_the_wiki.icons.redirect %></td></tr>
+ <tr><td><img width="16" height="16" src="/img/sources/wiki/wiki-t.png" alt="[t]"/></td><td><%= h(t.reports.language_comparison_table_for_keys_in_the_wiki.icons.template) %></td></tr>
+ <tr><td><img width="16" height="16" src="/img/sources/wiki/wiki-e.png" alt="[e]"/></td><td><%= h(t.reports.language_comparison_table_for_keys_in_the_wiki.icons.error) %></td></tr>
+ <tr><td><img width="16" height="16" src="/img/sources/wiki/wiki-p.png" alt="[p]"/></td><td><%= h(t.reports.language_comparison_table_for_keys_in_the_wiki.icons.page) %></td></tr>
+ <tr><td><img width="16" height="16" src="/img/sources/wiki/wiki-r.png" alt="[r]"/></td><td><%= h(t.reports.language_comparison_table_for_keys_in_the_wiki.icons.redirect) %></td></tr>
</table>
</div>
diff --git a/web/views/reports/languages.erb b/web/views/reports/languages.erb
index 2a4ffa7..175bd78 100644
--- a/web/views/reports/languages.erb
+++ b/web/views/reports/languages.erb
@@ -1,5 +1,5 @@
<div class="pre">
- <h1><%= t.reports.languages.name %></h1>
+ <h1><%= h(t.reports.languages.name) %></h1>
<%= t.reports.languages.intro %>
</div>
<div class="box">
diff --git a/web/views/reports/name_tags.erb b/web/views/reports/name_tags.erb
index f3196dd..c77bc8a 100644
--- a/web/views/reports/name_tags.erb
+++ b/web/views/reports/name_tags.erb
@@ -4,16 +4,16 @@
@sel[@filter_type] = ' selected="selected"'
%>
<div class="pre">
- <h1><%= t.reports.name_tags.name %></h1>
+ <h1><%= h(t.reports.name_tags.name) %></h1>
<%= t.reports.name_tags.intro %>
</div>
<div id="tabs">
<ul>
- <li><a href="#overview"><%= t.reports.name_tags.overview.tab %></a></li>
- <li><a href="#bcp47"><%= t.reports.name_tags.bcp47.tab %></a></li>
+ <li><a href="#overview"><%= h(t.reports.name_tags.overview.tab) %></a></li>
+ <li><a href="#bcp47"><%= h(t.reports.name_tags.bcp47.tab) %></a></li>
</ul>
<div id="overview">
- <h2><%= t.reports.name_tags.overview.title %></h2>
+ <h2><%= h(t.reports.name_tags.overview.title) %></h2>
<div class="boxpre">
<p>Tag keys containing "name".</p>
</div>
@@ -21,11 +21,11 @@
</table>
</div>
<div id="bcp47">
- <h2><%= t.reports.name_tags.bcp47.title %></h2>
+ <h2><%= h(t.reports.name_tags.bcp47.title) %></h2>
<div class="boxpre">
<%= t.reports.name_tags.bcp47.intro %>
<form id="subtag-filter-form">
- <label for="subtag-filter"><%= t.reports.name_tags.bcp47.filter.label %>:</label>
+ <label for="subtag-filter"><%= h(t.reports.name_tags.bcp47.filter.label) %>:</label>
<select id="subtag-filter" name="subtag-filter">
<option value="all"<%= @sel[''] %>><%= t.reports.name_tags.bcp47.filter.all %></option>
<% BCP47::SUBTAG_TYPES.each do |type| %>
diff --git a/web/views/reports/wiki_pages_about_non_existing_keys.erb b/web/views/reports/wiki_pages_about_non_existing_keys.erb
index ea1d790..46771d0 100644
--- a/web/views/reports/wiki_pages_about_non_existing_keys.erb
+++ b/web/views/reports/wiki_pages_about_non_existing_keys.erb
@@ -1,5 +1,5 @@
<div class="pre">
- <h1><%= t.reports.wiki_pages_about_non_existing_keys.name %></h1>
+ <h1><%= h(t.reports.wiki_pages_about_non_existing_keys.name) %></h1>
<%= t.reports.wiki_pages_about_non_existing_keys.intro %>
</div>
<div class="box resize">
diff --git a/web/views/search.erb b/web/views/search.erb
index b6bf5ce..40fdb20 100644
--- a/web/views/search.erb
+++ b/web/views/search.erb
@@ -1,37 +1,37 @@
<div class="pre">
<h1 class="section"><%= @title %></h1>
- <p><b><%= t.pages.search.you_were_searching_for %>:</b> <%= escape_html(@query) %></p>
+ <p><b><%= h(t.pages.search.you_were_searching_for) %>:</b> <%= escape_html(@query) %></p>
</div>
<div id="tabs">
<ul>
- <li><a href="#keys"><%= t.osm.keys %></a></li>
- <li><a href="#values"><%= t.osm.values %></a></li>
- <li><a href="#relations"><%= t.osm.relation_types %></a></li>
- <li><a href="#roles"><%= t.osm.relation_member_roles %></a></li>
- <li><a href="#fulltext"><%= t.pages.search.fulltext %></a></li>
+ <li><a href="#keys"><%= h(t.osm.keys) %></a></li>
+ <li><a href="#values"><%= h(t.osm.values) %></a></li>
+ <li><a href="#relations"><%= h(t.osm.relation_types) %></a></li>
+ <li><a href="#roles"><%= h(t.osm.relation_member_roles) %></a></li>
+ <li><a href="#fulltext"><%= h(t.pages.search.fulltext) %></a></li>
</ul>
<div id="keys">
- <h2><%= t.osm.keys %></h2>
+ <h2><%= h(t.osm.keys) %></h2>
<table id="grid-keys">
</table>
</div>
<div id="values">
- <h2><%= t.osm.values %></h2>
+ <h2><%= h(t.osm.values) %></h2>
<table id="grid-values">
</table>
</div>
<div id="relations">
- <h2><%= t.osm.relation_types %></h2>
+ <h2><%= h(t.osm.relation_types) %></h2>
<table id="grid-relations">
</table>
</div>
<div id="roles">
- <h2><%= t.osm.relation_member_roles %></h2>
+ <h2><%= h(t.osm.relation_member_roles) %></h2>
<table id="grid-roles">
</table>
</div>
<div id="fulltext">
- <h2><%= t.pages.search.fulltext %></h2>
+ <h2><%= h(t.pages.search.fulltext) %></h2>
<p class="boxpre" style="color: #f00000;">This search is experimental. It shows keys and tags that might be related to the word you searched for. This doesn't work if there are several words.</p>
<table id="grid-fulltext">
</table>
diff --git a/web/views/search_tags.erb b/web/views/search_tags.erb
index 0146263..ca3a509 100644
--- a/web/views/search_tags.erb
+++ b/web/views/search_tags.erb
@@ -1,13 +1,13 @@
<div class="pre">
<h1 class="section"><%= @title %></h1>
- <p><b><%= t.pages.search.you_were_searching_for %>:</b> <%= escape_html(@query) %></p>
+ <p><b><%= h(t.pages.search.you_were_searching_for) %>:</b> <%= escape_html(@query) %></p>
</div>
<div id="tabs">
<ul>
- <li><a href="#tags"><%= t.osm.tags %></a></li>
+ <li><a href="#tags"><%= h(t.osm.tags) %></a></li>
</ul>
<div id="tags">
- <h2><%= t.osm.tags %></h2>
+ <h2><%= h(t.osm.tags) %></h2>
<table id="grid-tags">
</table>
</div>
diff --git a/web/views/sources.erb b/web/views/sources.erb
index adc790b..4d338ee 100644
--- a/web/views/sources.erb
+++ b/web/views/sources.erb
@@ -1,20 +1,20 @@
<div class="pre">
- <h1 class="section"><%= t.taginfo.sources %></h1>
+ <h1 class="section"><%= h(t.taginfo.sources) %></h1>
<%= t.pages.sources.intro %>
</div>
<div class="box resize">
<table class="list">
<tr>
- <th class="tl"><%= t.taginfo.source %></th><th><%= t.pages.sources.data_until %>*</th><th><%= t.pages.sources.last_update_run %></th>
+ <th class="tl"><%= h(t.taginfo.source) %></th><th><%= h(t.pages.sources.data_until) %>*</th><th><%= h(t.pages.sources.last_update_run) %></th>
</tr>
<% Source.visible.each_with_index do |source, n| c = (n%2!=0) ? ' even' : '' %>
<tr>
- <td class="<%= c %>"><%= source.name %>
- <td class="tc<%= c %>"><%= source.data_until %> UTC</td>
- <td class="tc<%= c %>"><%= source.update_start + ' ' + t.pages.sources.to + ' ' + source.update_end %> UTC</td>
+ <td class="<%= c %>"><%= h(source.name) %>
+ <td class="tc<%= c %>"><%= h(source.data_until) %> UTC</td>
+ <td class="tc<%= c %>"><%= h(source.update_start + ' ' + t.pages.sources.to + ' ' + source.update_end) %> UTC</td>
</tr>
<% end %>
</table>
- <p style="font-size: 80%">* <%= t.pages.sources.data_until_explanation %></p>
+ <p style="font-size: 80%">* <%= h(t.pages.sources.data_until_explanation) %></p>
</div>
diff --git a/web/views/tag.erb b/web/views/tag.erb
index 34644d6..0d36332 100644
--- a/web/views/tag.erb
+++ b/web/views/tag.erb
@@ -1,11 +1,11 @@
<div class="pre">
<form id="filter-form">
- <label for="filter"><%= t.pages.key.filter.label %></label>
+ <label for="filter"><%= h(t.pages.key.filter.label) %></label>
<select id="filter" name="filter">
- <option value="all"<%= @sel['all'] %>><%= t.pages.key.filter.none %></option>
- <option value="nodes"<%= @sel['nodes'] %>><%= t.pages.key.filter.nodes %></option>
- <option value="ways"<%= @sel['ways'] %>><%= t.pages.key.filter.ways %></option>
- <option value="relations"<%= @sel['relations'] %>><%= t.pages.key.filter.relations %></option>
+ <option value="all"<%= @sel['all'] %>><%= h(t.pages.key.filter.none) %></option>
+ <option value="nodes"<%= @sel['nodes'] %>><%= h(t.pages.key.filter.nodes) %></option>
+ <option value="ways"<%= @sel['ways'] %>><%= h(t.pages.key.filter.ways) %></option>
+ <option value="relations"<%= @sel['relations'] %>><%= h(t.pages.key.filter.relations) %></option>
</select>
</form>
<div id="tools">
@@ -21,10 +21,10 @@
</div>
<div id="tabs">
<ul>
- <li><a href="#overview"><%= t.taginfo.overview %></a></li>
- <li><a href="#combinations"><%= t.taginfo.combinations %></a></li>
- <li><a href="#wiki"><%= t.sources.wiki.name %></a></li>
- <li><a href="#josm"><%= t.sources.josm.name %></a></li>
+ <li><a href="#overview"><%= h(t.taginfo.overview) %></a></li>
+ <li><a href="#combinations"><%= h(t.taginfo.combinations) %></a></li>
+ <li><a href="#wiki"><%= h(t.sources.wiki.name) %></a></li>
+ <li><a href="#josm"><%= h(t.sources.josm.name) %></a></li>
</ul>
<div id="overview">
<% if @image_url %>
@@ -32,35 +32,35 @@
<img src="<%= @image_url %>" alt=""/>
</div>
<% end %>
- <h2><%= t.taginfo.overview %></h2>
+ <h2><%= h(t.taginfo.overview) %></h2>
<table id="grid-overview">
</table>
<% if @has_rtype_link %>
- <p><%= t.pages.tag.overview.see_also %>: <span id="relationlink"></span></p>
+ <p><%= h(t.pages.tag.overview.see_also) %>: <span id="relationlink"></span></p>
<% end %>
</div>
<div id="combinations">
<div class="boxpre">
- <h2><%= t.pages.tag.combinations.title %></h2>
- <p><%= t.pages.tag.combinations.description %></p>
+ <h2><%= h(t.pages.tag.combinations.title) %></h2>
+ <p><%= h(t.pages.tag.combinations.description) %></p>
</div>
<table id="grid-combinations">
</table>
</div>
<div id="wiki">
- <h2><%= t.pages.tag.wiki_pages.title %></h2>
+ <h2><%= h(t.pages.tag.wiki_pages.title) %></h2>
<% if @wiki_count > 0 %>
<table id="grid-wiki">
</table>
<% else %>
- <p class="empty"><%= t.pages.tag.wiki_pages.none_found %> <%= @wiki_count_key > 0 ? t.pages.tag.wiki_pages.suggest_key_wiki_page('<span id="keylink"></span>') : '' %></p>
- <p><a class="extlink" target="_blank" rel="nofollow" href="http://wiki.openstreetmap.org/w/index.php?action=edit&title=Tag:<%= escape(@tag) %>"><%= t.pages.tag.wiki_pages.create %></a></p>
+ <p class="empty"><%= h(t.pages.tag.wiki_pages.none_found) %> <%= @wiki_count_key > 0 ? t.pages.tag.wiki_pages.suggest_key_wiki_page('<span id="keylink"></span>') : '' %></p>
+ <p><a class="extlink" target="_blank" rel="nofollow" href="http://wiki.openstreetmap.org/w/index.php?action=edit&title=Tag:<%= escape(@tag) %>"><%= h(t.pages.tag.wiki_pages.create) %></a></p>
<% end %>
</div>
<div id="josm">
- <h2><%= t.pages.tag.josm.title %></h2>
+ <h2><%= h(t.pages.tag.josm.title) %></h2>
<!-- <form>
- <label for="josm-style"><%= t.pages.tag.josm.choice %></label>
+ <label for="josm-style"><%= h(t.pages.tag.josm.choice) %></label>
<select id="josm-style" name="josm-style">
<option>Standard</option>
</select>
@@ -69,7 +69,7 @@
<table id="grid-josm">
</table>
<% else %>
- <p class="empty"><%= t.pages.key.josm.no_styles %></p>
+ <p class="empty"><%= h(t.pages.key.josm.no_styles) %></p>
<% end %>
</div>
</div>
diff --git a/web/views/tags.erb b/web/views/tags.erb
index ae21c85..9a849c0 100644
--- a/web/views/tags.erb
+++ b/web/views/tags.erb
@@ -1,6 +1,6 @@
<div class="pre">
- <h1 class="section"><%= t.osm.tags %></h1>
- <p><%= t.pages.tags.intro %></p>
+ <h1 class="section"><%= h(t.osm.tags) %></h1>
+ <p><%= h(t.pages.tags.intro) %></p>
</div>
<div class="box resize">
<table id="grid-tags">
diff --git a/web/viewsjs/key.js.erb b/web/viewsjs/key.js.erb
index e2a53bd..f40af36 100644
--- a/web/viewsjs/key.js.erb
+++ b/web/viewsjs/key.js.erb
@@ -8,9 +8,9 @@ var create_flexigrid_for = {
create_flexigrid('grid-overview', {
url: '/api/4/key/stats?key=' + encodeURIComponent(key),
colModel: [
- { display: '<%= misc.object_type %>', name: 'type', width: 100, sortable: true },
- { display: '<%= page.number_objects %>', name: 'count', width: 260, sortable: true, align: 'center' },
- { display: '<%= page.number_values %>', name: 'value', width: 140, sortable: true, align: 'right' }
+ { display: '<%= h(misc.object_type) %>', name: 'type', width: 100, sortable: true },
+ { display: '<%= h(page.number_objects) %>', name: 'count', width: 260, sortable: true, align: 'center' },
+ { display: '<%= h(page.number_values) %>', name: 'value', width: 140, sortable: true, align: 'right' }
],
usepager: false,
useRp: false,
@@ -33,13 +33,13 @@ var create_flexigrid_for = {
create_flexigrid('grid-values', {
url: '/api/4/key/values?key=' + encodeURIComponent(key) + '&filter=' + encodeURIComponent(filter_type) + '&lang=' + encodeURIComponent(lang),
colModel: [
- { display: '<%= osm.value %>', name: 'value', width: 200, sortable: true },
- { display: '<%= misc.count %>', name: 'count', width: 260, sortable: true, align: 'center' },
- { display: '<img src="/img/sources/wiki.16.png" alt="Wiki" width="16" height="16" title="<%= misc.in_wiki_tooltip %>"/>', name: 'in_wiki', width: 20, sortable: true, align: 'center' },
- { display: '<span title="<%= page.tag_description_from_wiki %>"><%= misc.description %></span>', name: 'description', width: 600, sortable: false, align: 'left' }
+ { display: '<%= h(osm.value) %>', name: 'value', width: 200, sortable: true },
+ { display: '<%= h(misc.count) %>', name: 'count', width: 260, sortable: true, align: 'center' },
+ { display: '<img src="/img/sources/wiki.16.png" alt="Wiki" width="16" height="16" title="<%= h(misc.in_wiki_tooltip) %>"/>', name: 'in_wiki', width: 20, sortable: true, align: 'center' },
+ { display: '<span title="<%= h(page.tag_description_from_wiki) %>"><%= h(misc.description) %></span>', name: 'description', width: 600, sortable: false, align: 'left' }
],
searchitems: [
- { display: '<%= osm.value %>', name: 'value' }
+ { display: '<%= h(osm.value) %>', name: 'value' }
],
sortname: 'count',
sortorder: 'desc',
@@ -61,12 +61,12 @@ var create_flexigrid_for = {
create_flexigrid('grid-keys', {
url: '/api/4/key/combinations?key=' + encodeURIComponent(key) + '&filter=' + encodeURIComponent(filter_type),
colModel: [
- { display: '<span title="<%= page.other_keys_used.to_count_tooltip %>"><%= misc.count %> &rarr;</span>', name: 'to_count', width: 260, sortable: true, align: 'center' },
- { display: '<span title="<%= page.other_keys_used.other_key_tooltip %>"><%= page.other_keys_used.other %></span>', name: 'other_key', width: 400, sortable: true },
- { display: '<span title="<%= page.other_keys_used.from_count_tooltip %>">&rarr; <%= misc.count %></span>', name: 'from_count', width: 260, sortable: true, align: 'center' }
+ { display: '<span title="<%= h(page.other_keys_used.to_count_tooltip) %>"><%= h(misc.count) %> &rarr;</span>', name: 'to_count', width: 260, sortable: true, align: 'center' },
+ { display: '<span title="<%= h(page.other_keys_used.other_key_tooltip) %>"><%= h(page.other_keys_used.other) %></span>', name: 'other_key', width: 400, sortable: true },
+ { display: '<span title="<%= h(page.other_keys_used.from_count_tooltip) %>">&rarr; <%= h(misc.count) %></span>', name: 'from_count', width: 260, sortable: true, align: 'center' }
],
searchitems: [
- { display: '<%= page.other_keys_used.other %>', name: 'other_key' }
+ { display: '<%= h(page.other_keys_used.other) %>', name: 'other_key' }
],
sortname: 'to_count',
sortorder: 'desc',
@@ -86,14 +86,14 @@ var create_flexigrid_for = {
create_flexigrid('grid-wiki', {
url: '/api/4/key/wiki_pages?key=' + encodeURIComponent(key),
colModel: [
- { display: '<%= misc.language %>', name: 'lang', width: 150, sortable: false },
- { display: '<%= page.wiki_pages.wiki_page %>', name: 'title', width: 160, sortable: false, align: 'right' },
- { display: '<%= misc.description %>', name: 'description', width: 400, sortable: false },
- { display: '<%= misc.image %>', name: 'image', width: 120, sortable: false },
- { display: '<%= osm.objects %>', name: 'objects', width: 80, sortable: false },
- { display: '<%= page.wiki_pages.implied_tags %>', name: 'tags_implied', width: 120, sortable: false },
- { display: '<%= page.wiki_pages.combined_tags %>', name: 'tags_combination', width: 120, sortable: false },
- { display: '<%= page.wiki_pages.linked_tags %>', name: 'tags_linked', width: 220, sortable: false }
+ { display: '<%= h(misc.language) %>', name: 'lang', width: 150, sortable: false },
+ { display: '<%= h(page.wiki_pages.wiki_page) %>', name: 'title', width: 160, sortable: false, align: 'right' },
+ { display: '<%= h(misc.description) %>', name: 'description', width: 400, sortable: false },
+ { display: '<%= h(misc.image) %>', name: 'image', width: 120, sortable: false },
+ { display: '<%= h(osm.objects) %>', name: 'objects', width: 80, sortable: false },
+ { display: '<%= h(page.wiki_pages.implied_tags) %>', name: 'tags_implied', width: 120, sortable: false },
+ { display: '<%= h(page.wiki_pages.combined_tags) %>', name: 'tags_combination', width: 120, sortable: false },
+ { display: '<%= h(page.wiki_pages.linked_tags) %>', name: 'tags_linked', width: 220, sortable: false }
],
usepager: false,
useRp: false,
@@ -124,10 +124,10 @@ var create_flexigrid_for = {
create_flexigrid('grid-josm', {
url: '/api/4/key/josm/style/rules?style=standard&key=' + encodeURIComponent(key),
colModel: [
- { display: '<%= osm.value %>', name: 'value', width: 400, sortable: true },
- { display: '<%= misc.icon %>', name: 'icon', width: 40, sortable: false, align: 'center' },
- { display: '<%= misc.line %>', name: 'line', width: 40, sortable: false, align: 'center' },
- { display: '<%= misc.area %>', name: 'area', width: 40, sortable: false, align: 'center' }
+ { display: '<%= h(osm.value) %>', name: 'value', width: 400, sortable: true },
+ { display: '<%= h(misc.icon) %>', name: 'icon', width: 40, sortable: false, align: 'center' },
+ { display: '<%= h(misc.line) %>', name: 'line', width: 40, sortable: false, align: 'center' },
+ { display: '<%= h(misc.area) %>', name: 'area', width: 40, sortable: false, align: 'center' }
],
sortname: 'value',
sortorder: 'asc',
diff --git a/web/viewsjs/keys.js.erb b/web/viewsjs/keys.js.erb
index df63387..13652f2 100644
--- a/web/viewsjs/keys.js.erb
+++ b/web/viewsjs/keys.js.erb
@@ -6,19 +6,19 @@ function page_init() {
create_flexigrid('grid-keys', {
url: '/api/4/keys/all?include=prevalent_values',
colModel: [
- { display: '<%= osm.key %>', name: 'key', width: 160, sortable: true },
- { display: '<span title="<%= misc.objects_tooltip %>"><img src="/img/types/all.16.png" width="16" height="16" alt=""/> <%= osm.objects %></span>', name: 'count_all', width: 160, sortable: true, align: 'center' },
- { display: '<span title="<%= misc.nodes_tooltip %>"><img src="/img/types/node.16.png" width="16" height="16" alt=""/> <%= osm.nodes %></span>', name: 'count_nodes', width: 250, sortable: true, align: 'center' },
- { display: '<span title="<%= misc.ways_tooltip %>"><img src="/img/types/way.16.png" width="16" height="16" alt=""/> <%= osm.ways %></span>', name: 'count_ways', width: 250, sortable: true, align: 'center' },
- { display: '<span title="<%= misc.relations_tooltip %>"><img src="/img/types/relation.16.png" width="16" height="16" alt=""/> <%= osm.relations %></span>', name: 'count_relations', width: 250, sortable: true, align: 'center' },
- { display: '<span title="<%= misc.users_tooltip %>"><%= osm.users %></span>', name: 'users_all', width: 44, sortable: true, align: 'right' },
- { display: '<img src="/img/sources/wiki.16.png" alt="Wiki" width="16" height="16" title="<%= misc.in_wiki_tooltip %>"/>', name: 'in_wiki', width: 20, sortable: true, align: 'center' },
- { display: '<img src="/img/sources/josm.16.png" alt="JOSM" width="16" height="16" title="<%= misc.in_josm_tooltip %>"/>', name: 'in_josm', width: 20, sortable: true, align: 'center' },
- { display: '<span title="<%= misc.values_tooltip %>"><%= osm.values %></span>', name: 'values_all', width: 70, sortable: true, align: 'right' },
- { display: '<span title="<%= misc.prevalent_values_tooltip %>"><%= misc.prevalent_values %></span>', name: 'prevalent_values', width: 500, sortable: true }
+ { display: '<%= h(osm.key) %>', name: 'key', width: 160, sortable: true },
+ { display: '<span title="<%= h(misc.objects_tooltip) %>"><img src="/img/types/all.16.png" width="16" height="16" alt=""/> <%= h(osm.objects) %></span>', name: 'count_all', width: 160, sortable: true, align: 'center' },
+ { display: '<span title="<%= h(misc.nodes_tooltip) %>"><img src="/img/types/node.16.png" width="16" height="16" alt=""/> <%= h(osm.nodes) %></span>', name: 'count_nodes', width: 250, sortable: true, align: 'center' },
+ { display: '<span title="<%= h(misc.ways_tooltip) %>"><img src="/img/types/way.16.png" width="16" height="16" alt=""/> <%= h(osm.ways) %></span>', name: 'count_ways', width: 250, sortable: true, align: 'center' },
+ { display: '<span title="<%= h(misc.relations_tooltip) %>"><img src="/img/types/relation.16.png" width="16" height="16" alt=""/> <%= h(osm.relations) %></span>', name: 'count_relations', width: 250, sortable: true, align: 'center' },
+ { display: '<span title="<%= h(misc.users_tooltip) %>"><%= h(osm.users) %></span>', name: 'users_all', width: 44, sortable: true, align: 'right' },
+ { display: '<img src="/img/sources/wiki.16.png" alt="Wiki" width="16" height="16" title="<%= h(misc.in_wiki_tooltip) %>"/>', name: 'in_wiki', width: 20, sortable: true, align: 'center' },
+ { display: '<img src="/img/sources/josm.16.png" alt="JOSM" width="16" height="16" title="<%= h(misc.in_josm_tooltip) %>"/>', name: 'in_josm', width: 20, sortable: true, align: 'center' },
+ { display: '<span title="<%= h(misc.values_tooltip) %>"><%= h(osm.values) %></span>', name: 'values_all', width: 70, sortable: true, align: 'right' },
+ { display: '<span title="<%= h(misc.prevalent_values_tooltip) %>"><%= h(misc.prevalent_values) %></span>', name: 'prevalent_values', width: 500, sortable: true }
],
searchitems: [
- { display: '<%= osm.key %>', name: 'key' }
+ { display: '<%= h(osm.key) %>', name: 'key' }
],
sortname: 'count_all',
sortorder: 'desc',
diff --git a/web/viewsjs/relation.js.erb b/web/viewsjs/relation.js.erb
index f0f6bb4..f192ffd 100644
--- a/web/viewsjs/relation.js.erb
+++ b/web/viewsjs/relation.js.erb
@@ -8,8 +8,8 @@ var create_flexigrid_for = {
create_flexigrid('grid-overview', {
url: '/api/4/relation/stats?rtype=' + encodeURIComponent(rtype),
colModel: [
- { display: '<%= page.overview.member_type %>', name: 'type', width: 100, sortable: true },
- { display: '<%= page.overview.member_count %>', name: 'count', width: 260, sortable: true, align: 'right' }
+ { display: '<%= h(page.overview.member_type) %>', name: 'type', width: 100, sortable: true },
+ { display: '<%= h(page.overview.member_count) %>', name: 'count', width: 260, sortable: true, align: 'right' }
],
usepager: false,
useRp: false,
@@ -31,14 +31,14 @@ var create_flexigrid_for = {
create_flexigrid('grid-roles', {
url: '/api/4/relation/roles?rtype=' + encodeURIComponent(rtype),
colModel: [
- { display: '<%= osm.relation_member_role %>', name: 'role', width: 250, sortable: true },
- { display: '<span title="<%= page.roles.objects_tooltip %>"><img src="/img/types/all.16.png" width="16" height="16" alt=""/> <%= osm.relation_members %></span>', name: 'count_all_members', width: 250, sortable: true, align: 'center' },
- { display: '<span title="<%= page.roles.nodes_tooltip %>"><img src="/img/types/node.16.png" width="16" height="16" alt=""/> <%= osm.relation_member_nodes %></span>', name: 'count_node_members', width: 250, sortable: true, align: 'center' },
- { display: '<span title="<%= page.roles.ways_tooltip %>"><img src="/img/types/way.16.png" width="16" height="16" alt=""/> <%= osm.relation_member_ways %></span>', name: 'count_way_members', width: 250, sortable: true, align: 'center' },
- { display: '<span title="<%= page.roles.relations_tooltip %>"><img src="/img/types/relation.16.png" width="16" height="16" alt=""/> <%= osm.relation_member_relations %></span>', name: 'count_relation_members', width: 250, sortable: true, align: 'center' },
+ { display: '<%= h(osm.relation_member_role) %>', name: 'role', width: 250, sortable: true },
+ { display: '<span title="<%= h(page.roles.objects_tooltip) %>"><img src="/img/types/all.16.png" width="16" height="16" alt=""/> <%= h(osm.relation_members) %></span>', name: 'count_all_members', width: 250, sortable: true, align: 'center' },
+ { display: '<span title="<%= h(page.roles.nodes_tooltip) %>"><img src="/img/types/node.16.png" width="16" height="16" alt=""/> <%= h(osm.relation_member_nodes) %></span>', name: 'count_node_members', width: 250, sortable: true, align: 'center' },
+ { display: '<span title="<%= h(page.roles.ways_tooltip) %>"><img src="/img/types/way.16.png" width="16" height="16" alt=""/> <%= h(osm.relation_member_ways) %></span>', name: 'count_way_members', width: 250, sortable: true, align: 'center' },
+ { display: '<span title="<%= h(page.roles.relations_tooltip) %>"><img src="/img/types/relation.16.png" width="16" height="16" alt=""/> <%= h(osm.relation_member_relations) %></span>', name: 'count_relation_members', width: 250, sortable: true, align: 'center' },
],
searchitems: [
- { display: '<%= osm.relation_member_role %>', name: 'role' }
+ { display: '<%= h(osm.relation_member_role) %>', name: 'role' }
],
sortname: 'count_all_members',
sortorder: 'desc',
@@ -60,10 +60,10 @@ var create_flexigrid_for = {
create_flexigrid('grid-wiki', {
url: '/api/4/relation/wiki_pages?rtype=' + encodeURIComponent(rtype),
colModel: [
- { display: '<%= misc.language %>', name: 'lang', width: 150, sortable: false },
- { display: '<%= page.wiki_pages.wiki_page %>', name: 'title', width: 160, sortable: false, align: 'right' },
- { display: '<%= misc.description %>', name: 'description', width: 500, sortable: false },
- { display: '<%= misc.image %>', name: 'image', width: 300, sortable: false }
+ { display: '<%= h(misc.language) %>', name: 'lang', width: 150, sortable: false },
+ { display: '<%= h(page.wiki_pages.wiki_page) %>', name: 'title', width: 160, sortable: false, align: 'right' },
+ { display: '<%= h(misc.description) %>', name: 'description', width: 500, sortable: false },
+ { display: '<%= h(misc.image) %>', name: 'image', width: 300, sortable: false }
],
usepager: false,
useRp: false,
diff --git a/web/viewsjs/relations.js.erb b/web/viewsjs/relations.js.erb
index a9389d6..3ce5979 100644
--- a/web/viewsjs/relations.js.erb
+++ b/web/viewsjs/relations.js.erb
@@ -6,13 +6,13 @@ function page_init() {
create_flexigrid('grid-relations', {
url: '/api/4/relations/all',
colModel: [
- { display: '<%= osm.relation_type %>', name: 'rtype', width: 220, sortable: true },
- { display: '<span title="<%= page.relations_of_type_tooltip %>"><%= osm.relations %></span>', name: 'count', width: 250, sortable: true, align: 'center' },
- { display: '<%= osm.tag %>', name: 'tag', width: 250, sortable: false },
- { display: '<span title="<%= page.prevalent_roles_tooltip %>"><%= page.prevalent_roles %></span>', name: 'prevalent_roles', width: 550, sortable: false }
+ { display: '<%= h(osm.relation_type) %>', name: 'rtype', width: 220, sortable: true },
+ { display: '<span title="<%= h(page.relations_of_type_tooltip) %>"><%= h(osm.relations) %></span>', name: 'count', width: 250, sortable: true, align: 'center' },
+ { display: '<%= h(osm.tag) %>', name: 'tag', width: 250, sortable: false },
+ { display: '<span title="<%= h(page.prevalent_roles_tooltip) %>"><%= h(page.prevalent_roles) %></span>', name: 'prevalent_roles', width: 550, sortable: false }
],
searchitems: [
- { display: '<%= osm.relation_type %>', name: 'rtype' }
+ { display: '<%= h(osm.relation_type) %>', name: 'rtype' }
],
sortname: 'count',
sortorder: 'desc',
@@ -32,7 +32,7 @@ function page_init() {
function fmt_prevalent_role_list(list) {
if (list === null) {
- return empty('<%= page.no_information %>');
+ return empty('<%= h(page.no_information) %>');
}
if (list.length == 0) {
return empty(page.roles_less_than_one_percent);
@@ -41,7 +41,7 @@ function fmt_prevalent_role_list(list) {
if (item.role) {
return tag('span', fmt_role(item.role), { tipsy: 'e', title: html_escape(item.role) + ' (' + fmt_as_percent(item.fraction) + ')' });
} else {
- return tag('span', empty('<%= page.empty_role %>'), { tipsy: 'e', title: '(' + fmt_as_percent(item.fraction) + ')' });
+ return tag('span', empty('<%= h(page.empty_role) %>'), { tipsy: 'e', title: '(' + fmt_as_percent(item.fraction) + ')' });
}
}).join(' &bull; ');
}
diff --git a/web/viewsjs/reports/characters_in_keys.js.erb b/web/viewsjs/reports/characters_in_keys.js.erb
index e322dcc..622652b 100644
--- a/web/viewsjs/reports/characters_in_keys.js.erb
+++ b/web/viewsjs/reports/characters_in_keys.js.erb
@@ -7,16 +7,16 @@ var create_flexigrid_for = {
create_flexigrid('grid-whitespace', {
url: '/api/4/keys/all?filters=characters_space&include=prevalent_values',
colModel: [
- { display: '<%= osm.key %>', name: 'key', width: 250, sortable: true },
- { display: '<span title="<%= misc.objects_tooltip %>"><img src="/img/types/all.16.png" width="16" height="16" alt=""/> <%= osm.objects %></span>', name: 'count_all', width: 150, sortable: true, align: 'center' },
- { display: '<span title="<%= misc.users_tooltip %>"><%= osm.users %></span>', name: 'users_all', width: 44, sortable: true, align: 'right' },
- { display: '<img src="/img/sources/wiki.16.png" width="16" height="16" alt="Wiki" title="<%= misc.in_wiki_tooltip %>"/>', name: 'in_wiki', width: 20, sortable: true, align: 'center' },
- { display: '<img src="/img/sources/josm.16.png" width="16" height="16" alt="JOSM" title="<%= misc.in_josm_tooltip %>"/>', name: 'in_josm', width: 20, sortable: true, align: 'center' },
- { display: '<span title="<%= misc.values_tooltip %>"><%= osm.values %></span>', name: 'values_all', width: 70, sortable: true, align: 'right' },
- { display: '<span title="<%= misc.prevalent_values_tooltip %>"><%= misc.prevalent_values %></span>', name: 'prevalent_values', width: 600, sortable: true }
+ { display: '<%= h(osm.key) %>', name: 'key', width: 250, sortable: true },
+ { display: '<span title="<%= h(misc.objects_tooltip) %>"><img src="/img/types/all.16.png" width="16" height="16" alt=""/> <%= h(osm.objects) %></span>', name: 'count_all', width: 150, sortable: true, align: 'center' },
+ { display: '<span title="<%= h(misc.users_tooltip) %>"><%= h(osm.users) %></span>', name: 'users_all', width: 44, sortable: true, align: 'right' },
+ { display: '<img src="/img/sources/wiki.16.png" width="16" height="16" alt="Wiki" title="<%= h(misc.in_wiki_tooltip) %>"/>', name: 'in_wiki', width: 20, sortable: true, align: 'center' },
+ { display: '<img src="/img/sources/josm.16.png" width="16" height="16" alt="JOSM" title="<%= h(misc.in_josm_tooltip) %>"/>', name: 'in_josm', width: 20, sortable: true, align: 'center' },
+ { display: '<span title="<%= h(misc.values_tooltip) %>"><%= h(osm.values) %></span>', name: 'values_all', width: 70, sortable: true, align: 'right' },
+ { display: '<span title="<%= h(misc.prevalent_values_tooltip) %>"><%= h(misc.prevalent_values) %></span>', name: 'prevalent_values', width: 600, sortable: true }
],
searchitems: [
- { display: '<%= osm.key %>', name: 'key' }
+ { display: '<%= h(osm.key) %>', name: 'key' }
],
sortname: 'count_all',
sortorder: 'desc',
@@ -40,16 +40,16 @@ var create_flexigrid_for = {
create_flexigrid('grid-problematic', {
url: '/api/4/keys/all?filters=characters_problematic&include=prevalent_values',
colModel: [
- { display: '<%= osm.key %>', name: 'key', width: 250, sortable: true },
- { display: '<span title="<%= misc.objects_tooltip %>"><img src="/img/types/all.16.png" width="16" height="16" alt=""/> <%= osm.objects %></span>', name: 'count_all', width: 150, sortable: true, align: 'center' },
- { display: '<span title="<%= misc.users_tooltip %>"><%= osm.users %></span>', name: 'users_all', width: 44, sortable: true, align: 'right' },
- { display: '<img src="/img/sources/wiki.16.png" width="16" height="16" alt="Wiki" title="<%= misc.in_wiki_tooltip %>"/>', name: 'in_wiki', width: 20, sortable: true, align: 'center' },
- { display: '<img src="/img/sources/josm.16.png" width="16" height="16" alt="JOSM" title="<%= misc.in_josm_tooltip %>"/>', name: 'in_josm', width: 20, sortable: true, align: 'center' },
- { display: '<span title="<%= misc.values_tooltip %>"><%= osm.values %></span>', name: 'values_all', width: 70, sortable: true, align: 'right' },
- { display: '<span title="<%= misc.prevalent_values_tooltip %>"><%= misc.prevalent_values %></span>', name: 'prevalent_values', width: 600, sortable: true }
+ { display: '<%= h(osm.key) %>', name: 'key', width: 250, sortable: true },
+ { display: '<span title="<%= h(misc.objects_tooltip) %>"><img src="/img/types/all.16.png" width="16" height="16" alt=""/> <%= h(osm.objects) %></span>', name: 'count_all', width: 150, sortable: true, align: 'center' },
+ { display: '<span title="<%= h(misc.users_tooltip) %>"><%= h(osm.users) %></span>', name: 'users_all', width: 44, sortable: true, align: 'right' },
+ { display: '<img src="/img/sources/wiki.16.png" width="16" height="16" alt="Wiki" title="<%= h(misc.in_wiki_tooltip) %>"/>', name: 'in_wiki', width: 20, sortable: true, align: 'center' },
+ { display: '<img src="/img/sources/josm.16.png" width="16" height="16" alt="JOSM" title="<%= h(misc.in_josm_tooltip) %>"/>', name: 'in_josm', width: 20, sortable: true, align: 'center' },
+ { display: '<span title="<%= h(misc.values_tooltip) %>"><%= h(osm.values) %></span>', name: 'values_all', width: 70, sortable: true, align: 'right' },
+ { display: '<span title="<%= h(misc.prevalent_values_tooltip) %>"><%= h(misc.prevalent_values) %></span>', name: 'prevalent_values', width: 600, sortable: true }
],
searchitems: [
- { display: '<%= osm.key %>', name: 'key' }
+ { display: '<%= h(osm.key) %>', name: 'key' }
],
sortname: 'count_all',
sortorder: 'desc',
diff --git a/web/viewsjs/reports/frequently_used_keys_without_wiki_page.js.erb b/web/viewsjs/reports/frequently_used_keys_without_wiki_page.js.erb
index ace2de2..f92cc45 100644
--- a/web/viewsjs/reports/frequently_used_keys_without_wiki_page.js.erb
+++ b/web/viewsjs/reports/frequently_used_keys_without_wiki_page.js.erb
@@ -7,15 +7,15 @@ function create_flexigrid_with_option(english) {
create_flexigrid('grid-keys', {
url: '/api/4/keys/without_wiki_page?english=' + english,
colModel: [
- { display: '<%= page.table.create_wiki_page %>', name: 'create_wiki_page', width: 200, sortable: false },
- { display: '<%= osm.key %>', name: 'key', width: 180, sortable: true },
- { display: '<span title="<%= misc.objects_tooltip %>"><img src="/img/types/all.16.png" width="16" height="16" alt=""/> <%= osm.objects %></span>', name: 'count_all', width: 70, sortable: true, align: 'right' },
- { display: '<%= osm.users %>', name: 'users_all', width: 44, sortable: true, align: 'right' },
- { display: '<span title="<%= misc.values_tooltip %>"><%= osm.values %></span>', name: 'values_all', width: 70, sortable: true, align: 'right' },
- { display: '<span title="<%= misc.prevalent_values_tooltip %>"><%= misc.prevalent_values %></span>', name: 'prevalent_values', width: 500, sortable: true }
+ { display: '<%= h(page.table.create_wiki_page) %>', name: 'create_wiki_page', width: 200, sortable: false },
+ { display: '<%= h(osm.key) %>', name: 'key', width: 180, sortable: true },
+ { display: '<span title="<%= h(misc.objects_tooltip) %>"><img src="/img/types/all.16.png" width="16" height="16" alt=""/> <%= h(osm.objects) %></span>', name: 'count_all', width: 70, sortable: true, align: 'right' },
+ { display: '<%= h(osm.users) %>', name: 'users_all', width: 44, sortable: true, align: 'right' },
+ { display: '<span title="<%= h(misc.values_tooltip) %>"><%= h(osm.values) %></span>', name: 'values_all', width: 70, sortable: true, align: 'right' },
+ { display: '<span title="<%= h(misc.prevalent_values_tooltip) %>"><%= h(misc.prevalent_values) %></span>', name: 'prevalent_values', width: 500, sortable: true }
],
searchitems: [
- { display: '<%= osm.key %>', name: 'key' }
+ { display: '<%= h(osm.key) %>', name: 'key' }
],
sortname: 'count_all',
sortorder: 'desc',
diff --git a/web/viewsjs/reports/josm_styles.js.erb b/web/viewsjs/reports/josm_styles.js.erb
index 4e0db90..6e49956 100644
--- a/web/viewsjs/reports/josm_styles.js.erb
+++ b/web/viewsjs/reports/josm_styles.js.erb
@@ -6,14 +6,14 @@ function create_flexigrid_with_option(stylename) {
create_flexigrid('grid-rules', {
url: '/api/4/josm/style/rules?style=' + stylename,
colModel: [
- { display: '<%= osm.key %>', name: 'key', width: 300, sortable: true },
- { display: '<%= osm.value %>', name: 'value', width: 300, sortable: true },
- { display: '<%= misc.icon %>', name: 'icon', width: 40, sortable: false, align: 'center' },
- { display: '<%= misc.line %>', name: 'line', width: 40, sortable: false, align: 'center' },
- { display: '<%= misc.area %>', name: 'area', width: 40, sortable: false, align: 'center' }
+ { display: '<%= h(osm.key) %>', name: 'key', width: 300, sortable: true },
+ { display: '<%= h(osm.value) %>', name: 'value', width: 300, sortable: true },
+ { display: '<%= h(misc.icon) %>', name: 'icon', width: 40, sortable: false, align: 'center' },
+ { display: '<%= h(misc.line) %>', name: 'line', width: 40, sortable: false, align: 'center' },
+ { display: '<%= h(misc.area) %>', name: 'area', width: 40, sortable: false, align: 'center' }
],
searchitems: [
- { display: '<%= osm.key %>/<%= osm.value %>', name: 'key' }
+ { display: '<%= h(osm.key) %>/<%= h(osm.value) %>', name: 'key' }
],
sortname: 'key',
sortorder: 'asc',
diff --git a/web/viewsjs/reports/key_lengths.js.erb b/web/viewsjs/reports/key_lengths.js.erb
index fc343d3..d0d691d 100644
--- a/web/viewsjs/reports/key_lengths.js.erb
+++ b/web/viewsjs/reports/key_lengths.js.erb
@@ -8,16 +8,16 @@ var create_flexigrid_for = {
create_flexigrid('grid-keys', {
url: '/api/4/keys/all?include=prevalent_values',
colModel: [
- { display: '<%= misc.length %>', name: 'length', width: 60, sortable: true, align: 'right' },
- { display: '<%= osm.key %>', name: 'key', width: 180, sortable: true },
- { display: '<span title="<%= misc.objects_tooltip %>"><img src="/img/types/all.16.png" width="16" height="16" alt=""/> <%= osm.objects %></span>', name: 'count_all', width: 200, sortable: true, align: 'center' },
- { display: '<img src="/img/sources/wiki.16.png" alt="Wiki" width="16" height="16" title="<%= misc.in_wiki_tooltip %>"/>', name: 'in_wiki', width: 20, sortable: true, align: 'center' },
- { display: '<img src="/img/sources/josm.16.png" alt="JOSM" width="16" height="16" title="<%= misc.in_josm_tooltip %>"/>', name: 'in_josm', width: 20, sortable: true, align: 'center' },
- { display: '<span title="<%= misc.values_tooltip %>"><%= osm.values %></span>', name: 'values_all', width: 70, sortable: true, align: 'right' },
- { display: '<span title="<%= misc.prevalent_values_tooltip %>"><%= misc.prevalent_values %></span>', name: 'prevalent_values', width: 550, sortable: true }
+ { display: '<%= h(misc.length) %>', name: 'length', width: 60, sortable: true, align: 'right' },
+ { display: '<%= h(osm.key) %>', name: 'key', width: 180, sortable: true },
+ { display: '<span title="<%= h(misc.objects_tooltip) %>"><img src="/img/types/all.16.png" width="16" height="16" alt=""/> <%= h(osm.objects) %></span>', name: 'count_all', width: 200, sortable: true, align: 'center' },
+ { display: '<img src="/img/sources/wiki.16.png" alt="Wiki" width="16" height="16" title="<%= h(misc.in_wiki_tooltip) %>"/>', name: 'in_wiki', width: 20, sortable: true, align: 'center' },
+ { display: '<img src="/img/sources/josm.16.png" alt="JOSM" width="16" height="16" title="<%= h(misc.in_josm_tooltip) %>"/>', name: 'in_josm', width: 20, sortable: true, align: 'center' },
+ { display: '<span title="<%= h(misc.values_tooltip) %>"><%= h(osm.values) %></span>', name: 'values_all', width: 70, sortable: true, align: 'right' },
+ { display: '<span title="<%= h(misc.prevalent_values_tooltip) %>"><%= h(misc.prevalent_values) %></span>', name: 'prevalent_values', width: 550, sortable: true }
],
searchitems: [
- { display: '<%= osm.key %>', name: 'key' }
+ { display: '<%= h(osm.key) %>', name: 'key' }
],
sortname: 'length',
sortorder: 'asc',
diff --git a/web/viewsjs/reports/language_comparison_table_for_keys_in_the_wiki.js.erb b/web/viewsjs/reports/language_comparison_table_for_keys_in_the_wiki.js.erb
index 85184a8..7609c96 100644
--- a/web/viewsjs/reports/language_comparison_table_for_keys_in_the_wiki.js.erb
+++ b/web/viewsjs/reports/language_comparison_table_for_keys_in_the_wiki.js.erb
@@ -23,13 +23,13 @@ function page_init() {
method: 'GET',
dataType: 'json',
colModel: [
- { display: '<br/><%= osm.key %>', name: 'key', width: 200, sortable: true },
+ { display: '<br/><%= h(osm.key) %>', name: 'key', width: 200, sortable: true },
<% @languages.each do |lang| %>
- { display: '<%= ::Language[lang].native_name %><br /><span class="lang" style="margin-top: 2px;"><%= lang %></span>', name: '<%= lang %>', align: 'center', width: 60, sortable: false },
+ { display: '<%= ::Language[lang].native_name %><br /><span class="lang" style="margin-top: 2px;"><%= h(lang) %></span>', name: '<%= h(lang) %>', align: 'center', width: 60, sortable: false },
<% end %>
],
searchitems: [
- { display: '<%= osm.key %>', name: 'key' }
+ { display: '<%= h(osm.key) %>', name: 'key' }
],
sortname: 'key',
sortorder: 'asc',
diff --git a/web/viewsjs/reports/languages.js.erb b/web/viewsjs/reports/languages.js.erb
index 23e02be..06ca0b6 100644
--- a/web/viewsjs/reports/languages.js.erb
+++ b/web/viewsjs/reports/languages.js.erb
@@ -4,11 +4,11 @@ function page_init() {
create_flexigrid('grid-langs', {
url: '/api/4/wiki/languages',
colModel: [
- { display: '<%= page.code %>', name: 'code', width: 60, sortable: true },
- { display: '<%= page.native_name %>', name: 'native_name', width: 150, sortable: true },
- { display: '<%= page.english_name %>', name: 'english_name', width: 150, sortable: true },
- { display: '<%= page.wiki_key_pages %>', name: 'wiki_key_pages', width: 260, sortable: true, align: 'center' },
- { display: '<%= page.wiki_tag_pages %>', name: 'wiki_tag_pages', width: 260, sortable: true, align: 'center' }
+ { display: '<%= h(page.code) %>', name: 'code', width: 60, sortable: true },
+ { display: '<%= h(page.native_name) %>', name: 'native_name', width: 150, sortable: true },
+ { display: '<%= h(page.english_name) %>', name: 'english_name', width: 150, sortable: true },
+ { display: '<%= h(page.wiki_key_pages) %>', name: 'wiki_key_pages', width: 260, sortable: true, align: 'center' },
+ { display: '<%= h(page.wiki_tag_pages) %>', name: 'wiki_tag_pages', width: 260, sortable: true, align: 'center' }
],
sortname: 'code',
sortorder: 'asc',
diff --git a/web/viewsjs/reports/name_tags.js.erb b/web/viewsjs/reports/name_tags.js.erb
index d558a29..b8ef586 100644
--- a/web/viewsjs/reports/name_tags.js.erb
+++ b/web/viewsjs/reports/name_tags.js.erb
@@ -11,9 +11,9 @@ var create_flexigrid_for = {
create_flexigrid('grid-name', {
url: '/api/0/keys/name',
colModel: [
- { display: '<%= osm.key %>', name: 'key', width: 250, sortable: true },
- { display: '<%= osm.objects %>', name: 'count_all', width: 100, sortable: true, align: 'right' },
- { display: '<img src="/img/sources/wiki.16.png" alt="Wiki" width="16" height="16" title="<%= misc.in_wiki_tooltip %>"/>', name: 'in_wiki', width: 20, sortable: true, align: 'center' },
+ { display: '<%= h(osm.key) %>', name: 'key', width: 250, sortable: true },
+ { display: '<%= h(osm.objects) %>', name: 'count_all', width: 100, sortable: true, align: 'right' },
+ { display: '<img src="/img/sources/wiki.16.png" alt="Wiki" width="16" height="16" title="<%= h(misc.in_wiki_tooltip) %>"/>', name: 'in_wiki', width: 20, sortable: true, align: 'center' },
{ display: 'Prefix', name: 'prefix', width: 100, sortable: true },
{ display: 'Type', name: 'type', width: 100, sortable: true },
{ display: 'Langtag', name: 'langtag', width: 100, sortable: true },
@@ -23,7 +23,7 @@ var create_flexigrid_for = {
{ display: 'Notes', name: 'notes', width: 500, sortable: true }
],
searchitems: [
- { display: '<%= osm.key %>', name: 'key' }
+ { display: '<%= h(osm.key) %>', name: 'key' }
],
sortname: 'count_all',
sortorder: 'desc',
diff --git a/web/viewsjs/reports/wiki_pages_about_non_existing_keys.js.erb b/web/viewsjs/reports/wiki_pages_about_non_existing_keys.js.erb
index fa8023c..e376f10 100644
--- a/web/viewsjs/reports/wiki_pages_about_non_existing_keys.js.erb
+++ b/web/viewsjs/reports/wiki_pages_about_non_existing_keys.js.erb
@@ -9,11 +9,11 @@ function page_init() {
colModel: [
{ display: '<img src="/img/sources/wiki.16.png" alt="Wiki" width="16" height="16" title="Wiki"/>', name: 'in_wiki', width: 20, sortable: true, align: 'center' },
{ display: '<img src="/img/sources/josm.16.png" alt="JOSM" width="16" height="16" title="JOSM"/>', name: 'in_josm', width: 20, sortable: true, align: 'center' },
- { display: '<%= osm.key %>', name: 'key', width: 250, sortable: true, align: 'left' },
- { display: '<%= page.wiki_pages %>', name: 'wikipages', width: 600, sortable: false, align: 'left' }
+ { display: '<%= h(osm.key) %>', name: 'key', width: 250, sortable: true, align: 'left' },
+ { display: '<%= h(page.wiki_pages) %>', name: 'wikipages', width: 600, sortable: false, align: 'left' }
],
searchitems: [
- { display: '<%= osm.key %>', name: 'key' }
+ { display: '<%= h(osm.key) %>', name: 'key' }
],
sortname: 'count_all',
sortorder: 'desc',
diff --git a/web/viewsjs/search.js.erb b/web/viewsjs/search.js.erb
index 3e65214..195f2fc 100644
--- a/web/viewsjs/search.js.erb
+++ b/web/viewsjs/search.js.erb
@@ -34,8 +34,8 @@ var create_flexigrid_for = {
create_flexigrid('grid-keys', {
url: '/api/4/keys/all?query=' + encodeURIComponent(query),
colModel: [
- { display: '<%= misc.count %>', name: 'count_all', width: 80, sortable: true, align: 'right' },
- { display: '<%= osm.key %>', name: 'key', width: 500, sortable: true }
+ { display: '<%= h(misc.count) %>', name: 'count_all', width: 80, sortable: true, align: 'right' },
+ { display: '<%= h(osm.key) %>', name: 'key', width: 500, sortable: true }
],
sortname: 'count_all',
sortorder: 'desc',
@@ -54,9 +54,9 @@ var create_flexigrid_for = {
create_flexigrid('grid-values', {
url: '/api/4/search/by_value?query=' + encodeURIComponent(query),
colModel: [
- { display: '<%= misc.count %>', name: 'count_all', width: 80, sortable: true, align: 'right' },
- { display: '<%= osm.key %>', name: 'key', width: 250, sortable: true },
- { display: '<%= osm.value %>', name: 'value', width: 500, sortable: true }
+ { display: '<%= h(misc.count) %>', name: 'count_all', width: 80, sortable: true, align: 'right' },
+ { display: '<%= h(osm.key) %>', name: 'key', width: 250, sortable: true },
+ { display: '<%= h(osm.value) %>', name: 'value', width: 500, sortable: true }
],
sortname: 'count_all',
sortorder: 'desc',
@@ -76,8 +76,8 @@ var create_flexigrid_for = {
create_flexigrid('grid-relations', {
url: '/api/4/relations/all?query=' + encodeURIComponent(query),
colModel: [
- { display: '<%= misc.count %>', name: 'count', width: 80, sortable: true, align: 'right' },
- { display: '<%= osm.relation_type %>', name: 'rtype', width: 500, sortable: true }
+ { display: '<%= h(misc.count) %>', name: 'count', width: 80, sortable: true, align: 'right' },
+ { display: '<%= h(osm.relation_type) %>', name: 'rtype', width: 500, sortable: true }
],
sortname: 'count',
sortorder: 'desc',
@@ -96,9 +96,9 @@ var create_flexigrid_for = {
create_flexigrid('grid-roles', {
url: '/api/4/search/by_role?query=' + encodeURIComponent(query),
colModel: [
- { display: '<%= misc.count %>', name: 'count_all', width: 80, sortable: true, align: 'right' },
- { display: '<%= osm.relation_types %>', name: 'rtype', width: 250, sortable: true },
- { display: '<%= osm.relation_member_roles %>', name: 'role', width: 500, sortable: true }
+ { display: '<%= h(misc.count) %>', name: 'count_all', width: 80, sortable: true, align: 'right' },
+ { display: '<%= h(osm.relation_types) %>', name: 'rtype', width: 250, sortable: true },
+ { display: '<%= h(osm.relation_member_roles) %>', name: 'role', width: 500, sortable: true }
],
sortname: 'count_all',
sortorder: 'desc',
@@ -119,9 +119,9 @@ var create_flexigrid_for = {
create_flexigrid('grid-tags', {
url: '/api/4/search/by_key_and_value?query=' + encodeURIComponent(query),
colModel: [
- { display: '<%= misc.count %>', name: 'count_all', width: 80, sortable: true, align: 'right' },
- { display: '<%= osm.key %>', name: 'key', width: 300, sortable: true },
- { display: '<%= osm.value %>', name: 'value', width: 500, sortable: true }
+ { display: '<%= h(misc.count) %>', name: 'count_all', width: 80, sortable: true, align: 'right' },
+ { display: '<%= h(osm.key) %>', name: 'key', width: 300, sortable: true },
+ { display: '<%= h(osm.value) %>', name: 'value', width: 500, sortable: true }
],
sortname: 'count_all',
sortorder: 'desc',
@@ -141,8 +141,8 @@ var create_flexigrid_for = {
create_flexigrid('grid-fulltext', {
url: '/api/4/search/by_keyword?query=' + encodeURIComponent(query),
colModel: [
- { display: '<%= osm.key %>', name: 'key', width: 300, sortable: true },
- { display: '<%= osm.value %>', name: 'value', width: 500, sortable: true }
+ { display: '<%= h(osm.key) %>', name: 'key', width: 300, sortable: true },
+ { display: '<%= h(osm.value) %>', name: 'value', width: 500, sortable: true }
],
sortname: 'key',
sortorder: 'asc',
diff --git a/web/viewsjs/tag.js.erb b/web/viewsjs/tag.js.erb
index f71990d..f9181d4 100644
--- a/web/viewsjs/tag.js.erb
+++ b/web/viewsjs/tag.js.erb
@@ -18,8 +18,8 @@ var create_flexigrid_for = {
create_flexigrid('grid-overview', {
url: '/api/4/tag/stats?key=' + encodeURIComponent(key) + '&value=' + encodeURIComponent(value),
colModel: [
- { display: '<%= misc.object_type %>', name: 'type', width: 100, sortable: true },
- { display: '<%= page.number_objects %>', name: 'count', width: 260, sortable: true, align: 'center' }
+ { display: '<%= h(misc.object_type) %>', name: 'type', width: 100, sortable: true },
+ { display: '<%= h(page.number_objects) %>', name: 'count', width: 260, sortable: true, align: 'center' }
],
usepager: false,
useRp: false,
@@ -41,12 +41,12 @@ var create_flexigrid_for = {
create_flexigrid('grid-combinations', {
url: '/api/4/tag/combinations?key=' + encodeURIComponent(key) + '&value=' + encodeURIComponent(value) + '&filter=' + encodeURIComponent(filter_type),
colModel: [
- { display: '<span title="<%= page.other_tags_used.to_count_tooltip %>"><%= misc.count %> &rarr;</span>', name: 'to_count', width: 260, sortable: true, align: 'center' },
- { display: '<span title="<%= page.other_tags_used.other_key_tooltip %>"><%= page.other_tags_used.other %></span>', name: 'other_tag', width: 400, sortable: true },
- { display: '<span title="<%= page.other_tags_used.from_count_tooltip %>">&rarr; <%= misc.count %></span>', name: 'from_count', width: 260, sortable: true, align: 'center' }
+ { display: '<span title="<%= h(page.other_tags_used.to_count_tooltip) %>"><%= h(misc.count) %> &rarr;</span>', name: 'to_count', width: 260, sortable: true, align: 'center' },
+ { display: '<span title="<%= h(page.other_tags_used.other_key_tooltip) %>"><%= h(page.other_tags_used.other) %></span>', name: 'other_tag', width: 400, sortable: true },
+ { display: '<span title="<%= h(page.other_tags_used.from_count_tooltip) %>">&rarr; <%= h(misc.count) %></span>', name: 'from_count', width: 260, sortable: true, align: 'center' }
],
searchitems: [
- { display: '<%= page.other_tags_used.other %>', name: 'other_tag' }
+ { display: '<%= h(page.other_tags_used.other) %>', name: 'other_tag' }
],
sortname: 'to_count',
sortorder: 'desc',
@@ -66,14 +66,14 @@ var create_flexigrid_for = {
create_flexigrid('grid-wiki', {
url: '/api/4/tag/wiki_pages?key=' + encodeURIComponent(key) + '&value=' + encodeURIComponent(value),
colModel: [
- { display: '<%= misc.language %>', name: 'lang', width: 150, sortable: false },
- { display: '<%= page.wiki_pages.wiki_page %>', name: 'title', width: 200, sortable: false, align: 'right' },
- { display: '<%= misc.description %>', name: 'description', width: 400, sortable: false },
- { display: '<%= misc.image %>', name: 'image', width: 120, sortable: false },
- { display: '<%= osm.objects %>', name: 'objects', width: 80, sortable: false },
- { display: '<%= page.wiki_pages.implied_tags %>', name: 'tags_implied', width: 120, sortable: false },
- { display: '<%= page.wiki_pages.combined_tags %>', name: 'tags_combination', width: 120, sortable: false },
- { display: '<%= page.wiki_pages.linked_tags %>', name: 'tags_linked', width: 220, sortable: false }
+ { display: '<%= h(misc.language) %>', name: 'lang', width: 150, sortable: false },
+ { display: '<%= h(page.wiki_pages.wiki_page) %>', name: 'title', width: 200, sortable: false, align: 'right' },
+ { display: '<%= h(misc.description) %>', name: 'description', width: 400, sortable: false },
+ { display: '<%= h(misc.image) %>', name: 'image', width: 120, sortable: false },
+ { display: '<%= h(osm.objects) %>', name: 'objects', width: 80, sortable: false },
+ { display: '<%= h(page.wiki_pages.implied_tags) %>', name: 'tags_implied', width: 120, sortable: false },
+ { display: '<%= h(page.wiki_pages.combined_tags) %>', name: 'tags_combination', width: 120, sortable: false },
+ { display: '<%= h(page.wiki_pages.linked_tags) %>', name: 'tags_linked', width: 220, sortable: false }
],
usepager: false,
useRp: false,
@@ -104,10 +104,10 @@ var create_flexigrid_for = {
create_flexigrid('grid-josm', {
url: '/api/4/tag/josm/style/rules?style=standard&key=' + encodeURIComponent(key) + '&value=' + encodeURIComponent(value),
colModel: [
- { display: '<%= osm.value %>', name: 'value', width: 400, sortable: false },
- { display: '<%= misc.icon %>', name: 'icon', width: 40, sortable: false, align: 'center' },
- { display: '<%= misc.line %>', name: 'line', width: 40, sortable: false, align: 'center' },
- { display: '<%= misc.area %>', name: 'area', width: 40, sortable: false, align: 'center' }
+ { display: '<%= h(osm.value) %>', name: 'value', width: 400, sortable: false },
+ { display: '<%= h(misc.icon) %>', name: 'icon', width: 40, sortable: false, align: 'center' },
+ { display: '<%= h(misc.line) %>', name: 'line', width: 40, sortable: false, align: 'center' },
+ { display: '<%= h(misc.area) %>', name: 'area', width: 40, sortable: false, align: 'center' }
],
sortname: 'value',
sortorder: 'asc',
diff --git a/web/viewsjs/tags.js.erb b/web/viewsjs/tags.js.erb
index f87351d..3c44bc4 100644
--- a/web/viewsjs/tags.js.erb
+++ b/web/viewsjs/tags.js.erb
@@ -6,15 +6,15 @@ function page_init() {
create_flexigrid('grid-tags', {
url: '/api/4/tags/popular',
colModel: [
- { display: '<%= osm.tag %>', name: 'tag', width: 300, sortable: true },
- { display: '<span title="<%= misc.objects_tooltip %>"><img src="/img/types/all.16.png" width="16" height="16" alt=""/> <%= osm.objects %></span>', name: 'count_all', width: 220, sortable: true, align: 'center' },
- { display: '<span title="<%= misc.nodes_tooltip %>"><img src="/img/types/node.16.png" width="16" height="16" alt=""/> <%= osm.nodes %></span>', name: 'count_nodes', width: 220, sortable: true, align: 'center' },
- { display: '<span title="<%= misc.ways_tooltip %>"><img src="/img/types/way.16.png" width="16" height="16" alt=""/> <%= osm.ways %></span>', name: 'count_ways', width: 220, sortable: true, align: 'center' },
- { display: '<span title="<%= misc.relations_tooltip %>"><img src="/img/types/relation.16.png" width="16" height="16" alt=""/> <%= osm.relations %></span>', name: 'count_relations', width: 220, sortable: true, align: 'center' },
- { display: '<img src="/img/sources/wiki.16.png" alt="Wiki" width="16" height="16" title="<%= misc.in_wiki_tooltip %>"/>', name: 'in_wiki', width: 20, sortable: true, align: 'center' }
+ { display: '<%= h(osm.tag) %>', name: 'tag', width: 300, sortable: true },
+ { display: '<span title="<%= h(misc.objects_tooltip) %>"><img src="/img/types/all.16.png" width="16" height="16" alt=""/> <%= h(osm.objects) %></span>', name: 'count_all', width: 220, sortable: true, align: 'center' },
+ { display: '<span title="<%= h(misc.nodes_tooltip) %>"><img src="/img/types/node.16.png" width="16" height="16" alt=""/> <%= h(osm.nodes) %></span>', name: 'count_nodes', width: 220, sortable: true, align: 'center' },
+ { display: '<span title="<%= h(misc.ways_tooltip) %>"><img src="/img/types/way.16.png" width="16" height="16" alt=""/> <%= h(osm.ways) %></span>', name: 'count_ways', width: 220, sortable: true, align: 'center' },
+ { display: '<span title="<%= h(misc.relations_tooltip) %>"><img src="/img/types/relation.16.png" width="16" height="16" alt=""/> <%= h(osm.relations) %></span>', name: 'count_relations', width: 220, sortable: true, align: 'center' },
+ { display: '<img src="/img/sources/wiki.16.png" alt="Wiki" width="16" height="16" title="<%= h(misc.in_wiki_tooltip) %>"/>', name: 'in_wiki', width: 20, sortable: true, align: 'center' }
],
searchitems: [
- { display: '<%= osm.tag %>', name: 'tag' }
+ { display: '<%= h(osm.tag) %>', name: 'tag' }
],
sortname: 'count_all',
sortorder: 'desc',