{"action":"created","comment":{"url":"https://api.github.com/repos/superdesk/liveblog/pulls/comments/31990041","id":31990041,"diff_hunk":"@@ -11,12 +11,28 @@\n \"\"\"Embed module\"\"\"\n import superdesk\n from flask import render_template, request\n+from superdesk import get_resource_service\n \n-bp = superdesk.Blueprint('embed_liveblog', __name__, template_folder='templates', static_folder='assets')\n+ASSETS_DIR = 'embed_assets'\n+bp = superdesk.Blueprint('embed_liveblog', __name__, template_folder='templates', static_folder=ASSETS_DIR)\n \n \n @bp.route('/embed/<blog_id>')\n def embed(blog_id):\n-    return render_template('embed.html', blog_id=blog_id, api_host=request.url_root)\n+\n+    def complete_url(url):\n+        def is_relative(url):\n+            return not (url.startswith('/') or url.startswith('http://') or url.startswith('https://'))","path":"server/liveblog/embed/embed.py","position":17,"original_position":17,"commit_id":"97f8ff10c5a67d04b6c9c66dfae913107663fb92","original_commit_id":"97f8ff10c5a67d04b6c9c66dfae913107663fb92","user":{"login":"nistormihai","id":836112,"avatar_url":"https://avatars.githubusercontent.com/u/836112?v=3","gravatar_id":"","url":"https://api.github.com/users/nistormihai","html_url":"https://github.com/nistormihai","followers_url":"https://api.github.com/users/nistormihai/followers","following_url":"https://api.github.com/users/nistormihai/following{/other_user}","gists_url":"https://api.github.com/users/nistormihai/gists{/gist_id}","starred_url":"https://api.github.com/users/nistormihai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nistormihai/subscriptions","organizations_url":"https://api.github.com/users/nistormihai/orgs","repos_url":"https://api.github.com/users/nistormihai/repos","events_url":"https://api.github.com/users/nistormihai/events{/privacy}","received_events_url":"https://api.github.com/users/nistormihai/received_events","type":"User","site_admin":false},"body":"starting with `/` maybe isn't a url at all it should start `//`","created_at":"2015-06-09T08:00:19Z","updated_at":"2015-06-09T08:00:19Z","html_url":"https://github.com/superdesk/liveblog/pull/111#discussion_r31990041","pull_request_url":"https://api.github.com/repos/superdesk/liveblog/pulls/111","_links":{"self":{"href":"https://api.github.com/repos/superdesk/liveblog/pulls/comments/31990041"},"html":{"href":"https://github.com/superdesk/liveblog/pull/111#discussion_r31990041"},"pull_request":{"href":"https://api.github.com/repos/superdesk/liveblog/pulls/111"}}},"pull_request":{"url":"https://api.github.com/repos/superdesk/liveblog/pulls/111","id":36952408,"html_url":"https://github.com/superdesk/liveblog/pull/111","diff_url":"https://github.com/superdesk/liveblog/pull/111.diff","patch_url":"https://github.com/superdesk/liveblog/pull/111.patch","issue_url":"https://api.github.com/repos/superdesk/liveblog/issues/111","number":111,"state":"open","locked":false,"title":"Feature/Theme System (LBSD-511)","user":{"login":"vied12","id":180617,"avatar_url":"https://avatars.githubusercontent.com/u/180617?v=3","gravatar_id":"","url":"https://api.github.com/users/vied12","html_url":"https://github.com/vied12","followers_url":"https://api.github.com/users/vied12/followers","following_url":"https://api.github.com/users/vied12/following{/other_user}","gists_url":"https://api.github.com/users/vied12/gists{/gist_id}","starred_url":"https://api.github.com/users/vied12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vied12/subscriptions","organizations_url":"https://api.github.com/users/vied12/orgs","repos_url":"https://api.github.com/users/vied12/repos","events_url":"https://api.github.com/users/vied12/events{/privacy}","received_events_url":"https://api.github.com/users/vied12/received_events","type":"User","site_admin":false},"body":"## TODO\r\n- [x] Repair the blog settings for theme\r\n- [x] Behave tests","created_at":"2015-06-04T16:26:22Z","updated_at":"2015-06-09T08:00:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6b5d85166c3a619b6b40a6b41f1bf91f54840f41","assignee":{"login":"vied12","id":180617,"avatar_url":"https://avatars.githubusercontent.com/u/180617?v=3","gravatar_id":"","url":"https://api.github.com/users/vied12","html_url":"https://github.com/vied12","followers_url":"https://api.github.com/users/vied12/followers","following_url":"https://api.github.com/users/vied12/following{/other_user}","gists_url":"https://api.github.com/users/vied12/gists{/gist_id}","starred_url":"https://api.github.com/users/vied12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vied12/subscriptions","organizations_url":"https://api.github.com/users/vied12/orgs","repos_url":"https://api.github.com/users/vied12/repos","events_url":"https://api.github.com/users/vied12/events{/privacy}","received_events_url":"https://api.github.com/users/vied12/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/superdesk/liveblog/pulls/111/commits","review_comments_url":"https://api.github.com/repos/superdesk/liveblog/pulls/111/comments","review_comment_url":"https://api.github.com/repos/superdesk/liveblog/pulls/comments{/number}","comments_url":"https://api.github.com/repos/superdesk/liveblog/issues/111/comments","statuses_url":"https://api.github.com/repos/superdesk/liveblog/statuses/97f8ff10c5a67d04b6c9c66dfae913107663fb92","head":{"label":"superdesk:feature/theme-system","ref":"feature/theme-system","sha":"97f8ff10c5a67d04b6c9c66dfae913107663fb92","user":{"login":"superdesk","id":5527298,"avatar_url":"https://avatars.githubusercontent.com/u/5527298?v=3","gravatar_id":"","url":"https://api.github.com/users/superdesk","html_url":"https://github.com/superdesk","followers_url":"https://api.github.com/users/superdesk/followers","following_url":"https://api.github.com/users/superdesk/following{/other_user}","gists_url":"https://api.github.com/users/superdesk/gists{/gist_id}","starred_url":"https://api.github.com/users/superdesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superdesk/subscriptions","organizations_url":"https://api.github.com/users/superdesk/orgs","repos_url":"https://api.github.com/users/superdesk/repos","events_url":"https://api.github.com/users/superdesk/events{/privacy}","received_events_url":"https://api.github.com/users/superdesk/received_events","type":"Organization","site_admin":false},"repo":{"id":30958944,"name":"liveblog","full_name":"superdesk/liveblog","owner":{"login":"superdesk","id":5527298,"avatar_url":"https://avatars.githubusercontent.com/u/5527298?v=3","gravatar_id":"","url":"https://api.github.com/users/superdesk","html_url":"https://github.com/superdesk","followers_url":"https://api.github.com/users/superdesk/followers","following_url":"https://api.github.com/users/superdesk/following{/other_user}","gists_url":"https://api.github.com/users/superdesk/gists{/gist_id}","starred_url":"https://api.github.com/users/superdesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superdesk/subscriptions","organizations_url":"https://api.github.com/users/superdesk/orgs","repos_url":"https://api.github.com/users/superdesk/repos","events_url":"https://api.github.com/users/superdesk/events{/privacy}","received_events_url":"https://api.github.com/users/superdesk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/superdesk/liveblog","description":"Liveblog  https://liveblog.sd-test.sourcefabric.org/#/  ","fork":false,"url":"https://api.github.com/repos/superdesk/liveblog","forks_url":"https://api.github.com/repos/superdesk/liveblog/forks","keys_url":"https://api.github.com/repos/superdesk/liveblog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/superdesk/liveblog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/superdesk/liveblog/teams","hooks_url":"https://api.github.com/repos/superdesk/liveblog/hooks","issue_events_url":"https://api.github.com/repos/superdesk/liveblog/issues/events{/number}","events_url":"https://api.github.com/repos/superdesk/liveblog/events","assignees_url":"https://api.github.com/repos/superdesk/liveblog/assignees{/user}","branches_url":"https://api.github.com/repos/superdesk/liveblog/branches{/branch}","tags_url":"https://api.github.com/repos/superdesk/liveblog/tags","blobs_url":"https://api.github.com/repos/superdesk/liveblog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/superdesk/liveblog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/superdesk/liveblog/git/refs{/sha}","trees_url":"https://api.github.com/repos/superdesk/liveblog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/superdesk/liveblog/statuses/{sha}","languages_url":"https://api.github.com/repos/superdesk/liveblog/languages","stargazers_url":"https://api.github.com/repos/superdesk/liveblog/stargazers","contributors_url":"https://api.github.com/repos/superdesk/liveblog/contributors","subscribers_url":"https://api.github.com/repos/superdesk/liveblog/subscribers","subscription_url":"https://api.github.com/repos/superdesk/liveblog/subscription","commits_url":"https://api.github.com/repos/superdesk/liveblog/commits{/sha}","git_commits_url":"https://api.github.com/repos/superdesk/liveblog/git/commits{/sha}","comments_url":"https://api.github.com/repos/superdesk/liveblog/comments{/number}","issue_comment_url":"https://api.github.com/repos/superdesk/liveblog/issues/comments{/number}","contents_url":"https://api.github.com/repos/superdesk/liveblog/contents/{+path}","compare_url":"https://api.github.com/repos/superdesk/liveblog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/superdesk/liveblog/merges","archive_url":"https://api.github.com/repos/superdesk/liveblog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/superdesk/liveblog/downloads","issues_url":"https://api.github.com/repos/superdesk/liveblog/issues{/number}","pulls_url":"https://api.github.com/repos/superdesk/liveblog/pulls{/number}","milestones_url":"https://api.github.com/repos/superdesk/liveblog/milestones{/number}","notifications_url":"https://api.github.com/repos/superdesk/liveblog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/superdesk/liveblog/labels{/name}","releases_url":"https://api.github.com/repos/superdesk/liveblog/releases{/id}","created_at":"2015-02-18T09:22:19Z","updated_at":"2015-05-08T07:48:14Z","pushed_at":"2015-06-05T14:43:25Z","git_url":"git://github.com/superdesk/liveblog.git","ssh_url":"git@github.com:superdesk/liveblog.git","clone_url":"https://github.com/superdesk/liveblog.git","svn_url":"https://github.com/superdesk/liveblog","homepage":null,"size":6711,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":4,"forks":6,"open_issues":4,"watchers":2,"default_branch":"master"}},"base":{"label":"superdesk:master","ref":"master","sha":"93453db0c7467c74d31c33e07bc95d1d7d3b6210","user":{"login":"superdesk","id":5527298,"avatar_url":"https://avatars.githubusercontent.com/u/5527298?v=3","gravatar_id":"","url":"https://api.github.com/users/superdesk","html_url":"https://github.com/superdesk","followers_url":"https://api.github.com/users/superdesk/followers","following_url":"https://api.github.com/users/superdesk/following{/other_user}","gists_url":"https://api.github.com/users/superdesk/gists{/gist_id}","starred_url":"https://api.github.com/users/superdesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superdesk/subscriptions","organizations_url":"https://api.github.com/users/superdesk/orgs","repos_url":"https://api.github.com/users/superdesk/repos","events_url":"https://api.github.com/users/superdesk/events{/privacy}","received_events_url":"https://api.github.com/users/superdesk/received_events","type":"Organization","site_admin":false},"repo":{"id":30958944,"name":"liveblog","full_name":"superdesk/liveblog","owner":{"login":"superdesk","id":5527298,"avatar_url":"https://avatars.githubusercontent.com/u/5527298?v=3","gravatar_id":"","url":"https://api.github.com/users/superdesk","html_url":"https://github.com/superdesk","followers_url":"https://api.github.com/users/superdesk/followers","following_url":"https://api.github.com/users/superdesk/following{/other_user}","gists_url":"https://api.github.com/users/superdesk/gists{/gist_id}","starred_url":"https://api.github.com/users/superdesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superdesk/subscriptions","organizations_url":"https://api.github.com/users/superdesk/orgs","repos_url":"https://api.github.com/users/superdesk/repos","events_url":"https://api.github.com/users/superdesk/events{/privacy}","received_events_url":"https://api.github.com/users/superdesk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/superdesk/liveblog","description":"Liveblog  https://liveblog.sd-test.sourcefabric.org/#/  ","fork":false,"url":"https://api.github.com/repos/superdesk/liveblog","forks_url":"https://api.github.com/repos/superdesk/liveblog/forks","keys_url":"https://api.github.com/repos/superdesk/liveblog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/superdesk/liveblog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/superdesk/liveblog/teams","hooks_url":"https://api.github.com/repos/superdesk/liveblog/hooks","issue_events_url":"https://api.github.com/repos/superdesk/liveblog/issues/events{/number}","events_url":"https://api.github.com/repos/superdesk/liveblog/events","assignees_url":"https://api.github.com/repos/superdesk/liveblog/assignees{/user}","branches_url":"https://api.github.com/repos/superdesk/liveblog/branches{/branch}","tags_url":"https://api.github.com/repos/superdesk/liveblog/tags","blobs_url":"https://api.github.com/repos/superdesk/liveblog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/superdesk/liveblog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/superdesk/liveblog/git/refs{/sha}","trees_url":"https://api.github.com/repos/superdesk/liveblog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/superdesk/liveblog/statuses/{sha}","languages_url":"https://api.github.com/repos/superdesk/liveblog/languages","stargazers_url":"https://api.github.com/repos/superdesk/liveblog/stargazers","contributors_url":"https://api.github.com/repos/superdesk/liveblog/contributors","subscribers_url":"https://api.github.com/repos/superdesk/liveblog/subscribers","subscription_url":"https://api.github.com/repos/superdesk/liveblog/subscription","commits_url":"https://api.github.com/repos/superdesk/liveblog/commits{/sha}","git_commits_url":"https://api.github.com/repos/superdesk/liveblog/git/commits{/sha}","comments_url":"https://api.github.com/repos/superdesk/liveblog/comments{/number}","issue_comment_url":"https://api.github.com/repos/superdesk/liveblog/issues/comments{/number}","contents_url":"https://api.github.com/repos/superdesk/liveblog/contents/{+path}","compare_url":"https://api.github.com/repos/superdesk/liveblog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/superdesk/liveblog/merges","archive_url":"https://api.github.com/repos/superdesk/liveblog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/superdesk/liveblog/downloads","issues_url":"https://api.github.com/repos/superdesk/liveblog/issues{/number}","pulls_url":"https://api.github.com/repos/superdesk/liveblog/pulls{/number}","milestones_url":"https://api.github.com/repos/superdesk/liveblog/milestones{/number}","notifications_url":"https://api.github.com/repos/superdesk/liveblog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/superdesk/liveblog/labels{/name}","releases_url":"https://api.github.com/repos/superdesk/liveblog/releases{/id}","created_at":"2015-02-18T09:22:19Z","updated_at":"2015-05-08T07:48:14Z","pushed_at":"2015-06-05T14:43:25Z","git_url":"git://github.com/superdesk/liveblog.git","ssh_url":"git@github.com:superdesk/liveblog.git","clone_url":"https://github.com/superdesk/liveblog.git","svn_url":"https://github.com/superdesk/liveblog","homepage":null,"size":6711,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":4,"forks":6,"open_issues":4,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/superdesk/liveblog/pulls/111"},"html":{"href":"https://github.com/superdesk/liveblog/pull/111"},"issue":{"href":"https://api.github.com/repos/superdesk/liveblog/issues/111"},"comments":{"href":"https://api.github.com/repos/superdesk/liveblog/issues/111/comments"},"review_comments":{"href":"https://api.github.com/repos/superdesk/liveblog/pulls/111/comments"},"review_comment":{"href":"https://api.github.com/repos/superdesk/liveblog/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/superdesk/liveblog/pulls/111/commits"},"statuses":{"href":"https://api.github.com/repos/superdesk/liveblog/statuses/97f8ff10c5a67d04b6c9c66dfae913107663fb92"}}}}