From f95bdca9d25333308ef2f0c80eb2011f42d4a5eb Mon Sep 17 00:00:00 2001 From: John Dong Date: Fri, 31 Aug 2007 12:25:42 -0400 Subject: [PATCH] Strip ridiculously long DNS names --- app/controllers/quickvote_controller.rb | 3 +-- app/views/quickvote/list_voters.rhtml | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) 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) %> -- 2.39.5