From: John Dong Date: Fri, 31 Aug 2007 16:25:42 +0000 (-0400) Subject: Strip ridiculously long DNS names X-Git-Url: https://projects.mako.cc/source/selectricity/commitdiff_plain/f95bdca9d25333308ef2f0c80eb2011f42d4a5eb?hp=59f7f3f18cc10105106d3aadfef76f33493a69f7 Strip ridiculously long DNS names --- diff --git a/app/controllers/quickvote_controller.rb b/app/controllers/quickvote_controller.rb index b9c790f..cc57bb5 100644 --- a/app/controllers/quickvote_controller.rb +++ b/app/controllers/quickvote_controller.rb @@ -185,8 +185,7 @@ class QuickvoteController < ApplicationController marker = GMarker.new([location.lat,location.lng], :title => "Voter", - :info_window => (voter.ipaddress or "unknown") \ - + " " + voter.vote.votestring) + :info_window => (voter.ipaddress or "unknown")) @map.overlay_init(marker) end end diff --git a/app/views/quickvote/list_voters.rhtml b/app/views/quickvote/list_voters.rhtml index ea276d7..4d8e538 100644 --- a/app/views/quickvote/list_voters.rhtml +++ b/app/views/quickvote/list_voters.rhtml @@ -38,11 +38,11 @@ end %> - <%=h((w.host == nil or w.host.empty?) ? voter.ipaddress : w.host)%> + <%=h((w.host == nil or w.host.empty?) ? voter.ipaddress : w.host[-30..-1])%> <%org=(w.all.grep(/^(OrgName|org-name)/)[0] or "").sub(/^(OrgName|org-name)\:/,'').strip+" - "+ (w.all.grep(/^(NetName|netname)/)[0] or "").sub(/^(NetName|netname)\:/,'').strip %> - <% if org =~ /IANA/ %> + <% if org =~ /asdfasdf/ %> <%= "No additional information" %> <% else %> <%= h(org) %>