mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Making links from bookmarklet shared stories absolute URLs.
This commit is contained in:
parent
7ccf61da5d
commit
decd50a610
1 changed files with 5 additions and 0 deletions
|
@ -2,6 +2,7 @@ import os
|
||||||
import base64
|
import base64
|
||||||
import urlparse
|
import urlparse
|
||||||
import datetime
|
import datetime
|
||||||
|
import lxml.html
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
from django.shortcuts import render_to_response
|
from django.shortcuts import render_to_response
|
||||||
|
@ -254,6 +255,10 @@ def share_story(request, token):
|
||||||
if feed:
|
if feed:
|
||||||
feed_id = feed.pk
|
feed_id = feed.pk
|
||||||
|
|
||||||
|
content = lxml.html.fromstring(content)
|
||||||
|
content.make_links_absolute(story_url)
|
||||||
|
content = lxml.html.tostring(content)
|
||||||
|
|
||||||
shared_story = MSharedStory.objects.filter(user_id=profile.user.pk,
|
shared_story = MSharedStory.objects.filter(user_id=profile.user.pk,
|
||||||
story_feed_id=feed_id,
|
story_feed_id=feed_id,
|
||||||
story_guid=story_url).limit(1).first()
|
story_guid=story_url).limit(1).first()
|
||||||
|
|
Loading…
Add table
Reference in a new issue