Skip to content
This repository

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

Open
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 = Contacts.new(type, account, password)
#contacts = test.contacts rescue []

contacts = [
  ["someone",
   "some.email%40hotmail.com&ru=http%3a%2f%2fmpeople.live.com%2fdefault.aspx%3fpg%3d0"],
  ["someone2",
   "some.email2%40hotmail.com&ru=http%3a%2f%2fmpeople.live.com%2fdefault.aspx%3fpg%3d0"]
  ]

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]}"
end
Pavel Tsiukhtsiayeu

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

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.
ca4295b
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.