Add rel=nofollow to links in tags. Closes #2555.
This commit is contained in:
parent
01c7470805
commit
d963aa30b7
4 changed files with 19 additions and 17 deletions
|
@ -1,6 +1,10 @@
|
|||
module ApplicationHelper
|
||||
def htmlize(text)
|
||||
return auto_link(sanitize(simple_format(text)), :link => :urls, :html => { :rel => "nofollow" })
|
||||
return linkify(sanitize(simple_format(text)))
|
||||
end
|
||||
|
||||
def linkify(text)
|
||||
return auto_link(text, :link => :urls, :html => { :rel => "nofollow" })
|
||||
end
|
||||
|
||||
def html_escape_unicode(text)
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<% if common_details.changeset.tags['comment'] %>
|
||||
<tr>
|
||||
<th><%= t 'browse.common_details.changeset_comment' %></th>
|
||||
<td><%= auto_link(h(common_details.changeset.tags['comment'])) %></td>
|
||||
<td><%= linkify(h(common_details.changeset.tags['comment'])) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<tr>
|
||||
<td><%= h(tag[0]) %> = <%= auto_link(h(tag[1])) %></td>
|
||||
<td><%= h(tag[0]) %> = <%= linkify(h(tag[1])) %></td>
|
||||
</tr>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
<td class="<%= cl %> comment">
|
||||
<% if changeset.tags['comment'] %>
|
||||
<%= auto_link(h(changeset.tags['comment'])) %>
|
||||
<%= linkify(h(changeset.tags['comment'])) %>
|
||||
<% else %>
|
||||
<%= t'changeset.changeset.no_comment' %>
|
||||
<% end %>
|
||||
|
@ -37,20 +37,18 @@
|
|||
<td class="<%= cl %> area">
|
||||
<% if changeset.min_lat.nil? %>
|
||||
<%= t'changeset.changeset.no_edits' %>
|
||||
<% else
|
||||
minlon = changeset.min_lon/GeoRecord::SCALE.to_f
|
||||
minlat = changeset.min_lat/GeoRecord::SCALE.to_f
|
||||
maxlon = changeset.max_lon/GeoRecord::SCALE.to_f
|
||||
maxlat = changeset.max_lat/GeoRecord::SCALE.to_f
|
||||
%>
|
||||
<% else %>
|
||||
<%
|
||||
minlon = changeset.min_lon/GeoRecord::SCALE.to_f
|
||||
minlat = changeset.min_lat/GeoRecord::SCALE.to_f
|
||||
maxlon = changeset.max_lon/GeoRecord::SCALE.to_f
|
||||
maxlat = changeset.max_lat/GeoRecord::SCALE.to_f
|
||||
%>
|
||||
<a href='/?minlon=<%= minlon %>&minlat=<%= minlat %>&maxlon=<%= maxlon %>&maxlat=<%= maxlat %>&box=yes' title='<%= t'changeset.changeset.show_area_box' %>'><%= format("%0.3f",minlon) -%>,<%= format("%0.3f",minlat) -%>,<%= format("%0.3f",maxlon) -%>,<%= format("%0.3f",maxlat) -%></a>
|
||||
<!--<%=changeset.area%>-->
|
||||
<% if changeset.area > 1500000000000 %>
|
||||
<%= t'changeset.changeset.big_area' %>
|
||||
<%
|
||||
end
|
||||
end
|
||||
%>
|
||||
<% if changeset.area > 1500000000000 %>
|
||||
<%= t'changeset.changeset.big_area' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
|
Loading…
Add table
Reference in a new issue