Skip to content

Commit

Permalink
Merge 3db8af5 into 8fdba7f
Browse files Browse the repository at this point in the history
  • Loading branch information
shevron committed Feb 16, 2021
2 parents 8fdba7f + 3db8af5 commit 3e2c450
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ckanext/pages/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,10 @@ def pages_upload(context, data_dict):
'upload', 'clear_upload')
upload.upload(uploader.get_max_image_size())
image_url = data_dict.get('image_url')
if image_url:
if image_url and image_url[0:6] not in {'http:/', 'https:'}:
image_url = h.url_for_static(
'uploads/page_images/%s' % image_url,
qualified = True
qualified=True
)
return {'url': image_url}

Expand Down

0 comments on commit 3e2c450

Please sign in to comment.