Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
42 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<img src="{{resource_view.get('image_url') or resource.get('url')}}" /> | ||
<img src="{{ resource_view.get('image_url') or h.view_resource_url(resource_view, resource, package, proxy_schemes=['http']) }}" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This breaks the test in https://github.com/okfn/ckan/blob/1251-resource-view/ckanext/resourceproxy/tests/test_proxy.py#L132-L139, because the
javascript
scheme isn't proxied. Then it gets to webtest's lint which fails when trying to get an URL which path doesn't start with a slash (as in http://google.com).AFAIK, it doesn't make much sense to proxy javascript "URLs", so I guess the problem is with the test (or with webtest). I'm not sure how to fix it, though.
Ideas?