Closed impca closed 8 years ago
:+1:
hey @impca seems like awesome work here but I'm curious about 1), do you have any example of a URL that caused a problem regarding that?
I tried to re-create that problem myself, I have a non UTF-8 site at https://huvud.herokuapp.com/latin1 and using the shell adapter:
the current version
myhubot> https://huvud.herokuapp.com/latin1
myhubot> åäö foo
and here is your code
edgehubot> https://huvud.herokuapp.com/latin1
edgehubot> åäö foo
"åäö foo" is what I see on Firefox, Edge and Chrome as title when I go to that website.
Hmm I think I did something wrong with the test site, will check later tonight
I fixed the test site and now it's the current version that have problems :) thanks again @impca
myhubot> https://huvud.herokuapp.com/latin1
myhubot> ��� foo
edgehubot> https://huvud.herokuapp.com/latin1
edgehubot> åäö foo
Hello.
You have an excellent plugin there, but there were some annoying minuscule things that I just had to fix. :)
1) Titles of webpages with an encoding that is not utf-8 are now correctly interpreted. No more garbled characters in hubot's chat output.
2) Linebreaks in titles are now discarded.
3) If a page contains multiple title tags, only the contents of the first one is used.