projects
/
hermes
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c21ac1
)
Strip out bits from the LinkedIn URL we don't want to expose.
author
Andrew Flegg
<andrew@bleb.org>
Wed, 9 Jun 2010 23:23:57 +0000
(
00:23
+0100)
committer
Andrew Flegg
<andrew@bleb.org>
Wed, 9 Jun 2010 23:23:57 +0000
(
00:23
+0100)
package/src/org/maemo/hermes/engine/linkedin/api.py
patch
|
blob
|
history
diff --git
a/package/src/org/maemo/hermes/engine/linkedin/api.py
b/package/src/org/maemo/hermes/engine/linkedin/api.py
index
fe0c80f
..
882360a
100644
(file)
--- a/
package/src/org/maemo/hermes/engine/linkedin/api.py
+++ b/
package/src/org/maemo/hermes/engine/linkedin/api.py
@@
-1,3
+1,4
@@
+import re
import httplib
import gnome.gconf
from oauth import oauth
@@
-107,8
+108,8
@@
class LinkedInApi():
def extract_public_url(node):
tag = get_first_tag(node, 'site-standard-profile-request')
if tag:
- url = extract(tag, 'url')
- return url.replace("&", "&")
+ url = extract(tag, 'url').replace("&", "&")
+ return re.sub('[?&](auth|trk)\w*=[^&]*', '', url)
# look for errors
errors = dom.getElementsByTagName('error')