My class looks like this:
class Post(db.Model):
link = db.LinkProperty()
I am getting the url parameter and populating the class like this:
newpost = Post(
link = cgi.escape(self.request.get('link')))
newpost.put()
If I send a regular link it works fine.
If I send a link like this (with a hash): http://www.url.com#paragraph2, it chokes.
Has anyone dealt with this before? Any recommendations would be appreciated.
The hash component of a URL is never sent to the server.
This behavior is used in some AJAX patterns because of this property.
I would recommend URL-encoding the hash in the URL to
%23:http://example.com/whatever%23afterHash