Skip to content
This repository

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

PavelTyk opened this Issue · 2 comments

2 participants

Pavel Tsiukhtsiayeu Francisco Fabian Ruiz Guerrero
Pavel Tsiukhtsiayeu

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

Francisco Fabian Ruiz Guerrero

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

require 'uri'

Get your contacts:

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

contacts = [
  ]! 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]}"
Pavel Tsiukhtsiayeu

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

Kenneth Kalmer kennethkalmer referenced this issue from a commit in kennethkalmer/cardmagic-contacts
Pavel Tsiukhtsiayeu PavelTyk 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
Something went wrong with that request. Please try again.