shreeharsha-hirecraft / google-gdata

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

YouTubeQuery does not encode '#' properly #524

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a YouTubeQuery Object 
2. Set the Query property to '#hashtag'
3. Look at the Uri property..

What is the expected output? What do you see instead?
The expected output should be ...?q=%23hastag....  Instead it will be 
...?q=#hastag...

What version of the product are you using? On what operating system?
1.8.0 - windows 7 using MSVC 2010

Please provide any additional information below.
I'm not sure if this is something that is not handled correctly in the youtube 
library, the Utility library or by youtube.com itself.  In any case if anyone 
knows a workaround I would like to know of it.  (chriskuck at gmail dot com )

Original issue reported on code.google.com by chrisk...@gmail.com on 14 Jul 2011 at 5:13

GoogleCodeExporter commented 8 years ago
I did figure out a work around : 

            if (query.Uri.AbsoluteUri.Contains('#'))
            {
                query.BaseAddress = query.Uri.AbsoluteUri.Replace("#", "%23");
            }

however it should work without me doing string manipulation after a uri is built

Original comment by chrisk...@gmail.com on 14 Jul 2011 at 5:41

GoogleCodeExporter commented 8 years ago
Hey Chris,

Thanks for reporting this issue, it was easy to reproduce by following your 
instructions.
I fixed it in the core library, the patch is now included as of rev. 1112.

Claudio

Original comment by ccherub...@google.com on 15 Jul 2011 at 10:21