Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Contacts::Hotmail emails are not escaped and have some junk #21

PavelTyk opened this Issue Sep 14, 2010 · 2 comments


None yet
2 participants

Emails are not HTML unescaped properly. There are junk at the end of the email address.

I just start using the contacts gem and I fixed it using "URI.unescape" and "split".

require 'uri'

Get your contacts:

type = "hotmail"
#test = Contacts.new(type, account, password)
#contacts = test.contacts rescue []

contacts = [

contacts.map! do | contact|
    [ contact[0], URI.unescape(contact[1].split("&")[0]) ]
end if ( type == 'hotmail')

contacts.each do |contact|
    puts "name : #{contact[0]} --> email: #{contact[1]}"

PavelTyk commented Apr 6, 2011

Well, I've found another solution for this. Take a look at my pull request:

@kennethkalmer kennethkalmer added a commit to kennethkalmer/cardmagic-contacts that referenced this issue Dec 29, 2011

@PavelTyk @kennethkalmer PavelTyk + kennethkalmer Issue #21: Emails are HTML unescaped properly. Junk at the end of the…
… email address removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment