silany / google-gdata

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

Can't add event starting with bracket to Google Calendar #599

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I'm trying to add event starting with bracket - say "[test]" or "(test) 
something" into calendar via API, and result i'm getting back is the same 
string but with truncated first opening bracket "test]" or "test)".
Was looking into source code, particularly into Google.GData.Client.Service 
class, but data that is transmitted in Insert(Uri feedUri, AtomEntry newEntry, 
AsyncSendData data) and EntrySend(Uri feedUri, AtomBase baseEntry, 
GDataRequestType type, AsyncSendData data) method is accurate, so i guess 
truncation happens elsewhere. Any ideas how to fix this? Thanks in advance.

Original issue reported on code.google.com by olexande...@gmail.com on 18 Jun 2012 at 7:55

GoogleCodeExporter commented 8 years ago
Can you capture the HTTP traffic with Fiddler and share the request and 
response here so that we can see whether the brackets are sent correctly?

Original comment by ccherub...@google.com on 18 Jun 2012 at 3:52

GoogleCodeExporter commented 8 years ago
POST 
https://www.google.com/calendar/feeds/olexander.valetsky%40gmail.com/private/ful
l HTTP/1.1
Content-Type: application/atom+xml; charset=UTF-8
User-Agent: G-GMinder/GDataGAuthRequestFactory-CS-Version=2.1.0.16320
Authorization: GoogleLogin auth=<auth headers>
GData-Version: 2.0
Host: www.google.com
Cookie: S=calendar=t_EZJlRk7BTs_xC9oyh8rQ
Content-Length: 385
Expect: 100-continue

<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" 
xmlns:gd="http://schemas.google.com/g/2005">
  <gCal:quickadd value="true" xmlns:gCal="http://schemas.google.com/gCal/2005" />
  <category term="http://schemas.google.com/g/2005#event" scheme="http://schemas.google.com/g/2005#kind" />
  <content type="text">[test event] today</content>
</entry>
HTTP/1.1 201 Created
Expires: Tue, 19 Jun 2012 09:21:20 GMT
Date: Tue, 19 Jun 2012 09:21:20 GMT
Content-Type: application/atom+xml; charset=UTF-8; type=entry
Cache-Control: private, max-age=0, must-revalidate, no-transform
Vary: Accept, X-GData-Authorization, GData-Version
GData-Version: 2.6
ETag: "FUoCRwxGdyp7JGA6WhJU"
Location: 
https://www.google.com/calendar/feeds/olexander.valetsky%40gmail.com/private/ful
l/0mup3e1ljdv94k2q541h0o3tk4
Content-Location: 
https://www.google.com/calendar/feeds/olexander.valetsky%40gmail.com/private/ful
l/0mup3e1ljdv94k2q541h0o3tk4
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Transfer-Encoding: chunked

843
<?xml version='1.0' encoding='UTF-8'?><entry 
xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' 
xmlns:gCal='http://schemas.google.com/gCal/2005' 
xmlns:gd='http://schemas.google.com/g/2005' gd:etag='"FUoCRwxGdyp7JGA6WhJU"' 
gd:kind='calendar#event'><id>http://www.google.com/calendar/feeds/olexander.vale
tsky%40gmail.com/events/0mup3e1ljdv94k2q541h0o3tk4</id><published>2012-06-19T09:
21:19.000Z</published><updated>2012-06-19T09:21:19.000Z</updated><app:edited>201
2-06-19T09:21:19.000Z</app:edited><category 
scheme='http://schemas.google.com/g/2005#kind' 
term='http://schemas.google.com/g/2005#event'/><title>test 
event]</title><content/><link rel='alternate' type='text/html' 
href='https://www.google.com/calendar/event?eid=MG11cDNlMWxqZHY5NGsycTU0MWgwbzN0
azQgb2xleGFuZGVyLnZhbGV0c2t5QG0' title='alternate'/><link rel='self' 
type='application/atom+xml' 
href='https://www.google.com/calendar/feeds/olexander.valetsky%40gmail.com/priva
te/full/0mup3e1ljdv94k2q541h0o3tk4'/><link rel='edit' 
type='application/atom+xml' 
href='https://www.google.com/calendar/feeds/olexander.valetsky%40gmail.com/priva
te/full/0mup3e1ljdv94k2q541h0o3tk4'/><author><name>Olexander 
Valetsky</name><email>olexander.valetsky@gmail.com</email></author><gd:comments>
<gd:feedLink 
href='https://www.google.com/calendar/feeds/olexander.valetsky%40gmail.com/priva
te/full/0mup3e1ljdv94k2q541h0o3tk4/comments'/></gd:comments><gd:eventStatus 
value='http://schemas.google.com/g/2005#event.confirmed'/><gd:where 
valueString=''/><gd:who email='olexander.valetsky@gmail.com' 
rel='http://schemas.google.com/g/2005#event.organizer' 
valueString='olexander.valetsky@gmail.com'/><gd:when endTime='2012-06-20' 
startTime='2012-06-19'/><gd:transparency 
value='http://schemas.google.com/g/2005#event.transparent'/><gd:visibility 
value='http://schemas.google.com/g/2005#event.default'/><gCal:anyoneCanAddSelf 
value='false'/><gCal:guestsCanInviteOthers value='true'/><gCal:guestsCanModify 
value='false'/><gCal:guestsCanSeeGuests value='true'/><gCal:sequence 
value='0'/><gCal:uid value='0mup3e1ljdv94k2q541h0o3tk4@google.com'/></entry>
0

Original comment by olexande...@gmail.com on 19 Jun 2012 at 9:23

GoogleCodeExporter commented 8 years ago
Thanks, we'll investigate the issue. 
Have you tried to reproduce it with the new version of the Calendar API (v3)?

https://developers.google.com/google-apps/calendar/

We strongly recommend developers to update their code to to use the new API.

Original comment by ccherub...@google.com on 19 Jun 2012 at 4:17

GoogleCodeExporter commented 8 years ago
I'm looking forward to that, but project i'm interested in - GMinder 
(http://code.google.com/p/gminder) uses google-gdata libraries and transition 
to new API may need huge refactoring.

Original comment by olexande...@gmail.com on 20 Jun 2012 at 6:26

GoogleCodeExporter commented 8 years ago
dunno if it helps, but this happens also www.google.com/calendar

Just try to add an event by clicking a day an type smth like:
9:00 [party] don't forget the beer

You get a new event at 9:00 named: party] don't forget the beer

Original comment by vlad.mar...@gmail.com on 30 Jun 2012 at 9:32