Skip to content

Commit c441f98

Browse files
committed
escaping server response in templates
1 parent e2e4c85 commit c441f98

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "IP Address & Geolocation",
3-
"version": "1.3.7",
3+
"version": "1.4",
44
"manifest_version": 2,
55
"icons": {
66
"16": "img/icon16.png",

popup.html

+7-7
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<small>IP:</small>
4747
</td>
4848
<td>
49-
<small><%= geolocation.ip %></small>
49+
<small><%- geolocation.ip %></small>
5050
</td>
5151
</tr>
5252
<% if(geolocation.ip_forwarded_for != false) { %>
@@ -55,7 +55,7 @@
5555
<small>Real IP (sent with the 'X-Forwarded-For' header):</small>
5656
</td>
5757
<td>
58-
<small><%= geolocation.ip_forwarded_for %></small>
58+
<small><%- geolocation.ip_forwarded_for %></small>
5959
</td>
6060
</tr>
6161
<% } %>
@@ -65,7 +65,7 @@
6565
</td>
6666
<% if(geolocation.country_code != '') { %>
6767
<td>
68-
<small><%= geolocation.country_name %> (<%= geolocation.country_code %>)</small>
68+
<small><%- geolocation.country_name %> (<%- geolocation.country_code %>)</small>
6969
</td>
7070
<% } else { %>
7171
<td>
@@ -79,7 +79,7 @@
7979
</td>
8080
<% if(geolocation.region != '') { %>
8181
<td>
82-
<small><%= geolocation.city %> (<%= geolocation.region %>)</small>
82+
<small><%- geolocation.city %> (<%- geolocation.region %>)</small>
8383
</td>
8484
<% } else { %>
8585
<td>
@@ -93,7 +93,7 @@
9393
</td>
9494
<% if(geolocation.user_agent != '') { %>
9595
<td>
96-
<small><%= geolocation.user_agent %></small>
96+
<small><%- geolocation.user_agent %></small>
9797
</td>
9898
<% } else { %>
9999
<td>
@@ -110,9 +110,9 @@
110110
if(geolocation.region != '') {
111111
mapsZoom = '12';
112112
} %>
113-
<a href="https://www.google.com/maps/preview/@<%= geolocation.latitude %>,<%= geolocation.longitude %>,<%= mapsZoom %>z" target="_blank">
113+
<a href="https://www.google.com/maps/preview/@<%- geolocation.latitude %>,<%- geolocation.longitude %>,<%- mapsZoom %>z" target="_blank">
114114
<% if(showGMaps) { %>
115-
<img src="http://maps.googleapis.com/maps/api/staticmap?center=<%= geolocation.latitude %> <%= geolocation.longitude %>&zoom=<%= mapsZoom %>&size=500x300&maptype=roadmap"
115+
<img src="http://maps.googleapis.com/maps/api/staticmap?center=<%- geolocation.latitude %> <%- geolocation.longitude %>&zoom=<%- mapsZoom %>&size=500x300&maptype=roadmap"
116116
style="border: 1px solid #000;" width="500" height="300"/>
117117
<% } else { %>
118118
Show my IP location on Google Maps

0 commit comments

Comments
 (0)