diff --git a/digimarks.py b/digimarks.py index 82d5ad1..3ba55c2 100644 --- a/digimarks.py +++ b/digimarks.py @@ -7,7 +7,7 @@ import requests import shutil import bs4 from more_itertools import unique_everseen -from urlparse import urlparse, urlunparse +from urlparse import urlparse, urlunparse, urljoin from utilkit import datetimeutil @@ -211,6 +211,10 @@ def get_cached_tags(userkey): return [] +def make_external(url): + return urljoin(request.url_root, url) + + @app.errorhandler(404) def page_not_found(e): return render_template('404.html', error=e), 404 @@ -424,7 +428,7 @@ def publictagfeed(tagkey): try: this_tag = PublicTag.get(PublicTag.tagkey == tagkey) bookmarks = Bookmark.select().where(Bookmark.userkey == this_tag.userkey, Bookmark.tags.contains(this_tag.tag), Bookmark.status == Bookmark.VISIBLE).limit(15) - feed = AtomFeed(this_tag.tag, feed_url=request.url, url=url_for('publictag', tagkey=tagkey)) + feed = AtomFeed(this_tag.tag, feed_url=request.url, url=make_external(url_for('publictag', tagkey=tagkey))) for bookmark in bookmarks: updated_date = bookmark.modified_date if not bookmark.modified_date: