carolinux / gdata-python-client

Automatically exported from code.google.com/p/gdata-python-client
0 stars 1 forks source link

get_blog_name() does not correctly handle blog URLs containing hyphens #428

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. feed = client.get_blogs()
2. print feed.entry[0].get_blog_name()

What is the expected output? What do you see instead?
For the blog http://aaa-bbb-ccc.blogspot.com/, I expect "aaa-bbb-ccc" but 
instead get "aaa".

This is because BLOG_NAME_PATTERN in gdata/blogger/data.py assumes that blog 
names can be matched with the regexp "(http://)(\w*)". To fix this, the regexp 
should be changed to "(http://)([-\w]*)".

More importantly, are there other characters outside of the \w class that can 
appear in blogspot URLs?

What version of the product are you using?
python-gdata 2.0.8-1.1 (Debian squeeze)

Please provide any additional information below.

Original issue reported on code.google.com by rob....@gmail.com on 11 Aug 2010 at 9:32

GoogleCodeExporter commented 9 years ago
This is fixed in revision 367ba53359.  Thanks! -joe

Original comment by joe.gregorio@gmail.com on 17 Sep 2010 at 6:21