-
Notifications
You must be signed in to change notification settings - Fork 81
Updated Commons DAM example to work - User-agent is missing #3028
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4,7 +4,7 @@ | |||||
| {{ parent() }} | ||||||
| <div> | ||||||
| <a href="{{ asset.assetMetadata.page_url }}">Image</a> | ||||||
| {% if asset.assetMetadata.author %} by {{ asset.assetMetadata.author }}{% endif %} | ||||||
| {% if asset.assetMetadata.author %} by {{ asset.assetMetadata.author|striptags }}{% endif %} | ||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we trust that the URL coming from Commons cannot contain bad things. This will display the author as link:
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a 3rd party site so we can never be 100% sure - and this template is just an example, this will be easy to modify. I'd keep it as it (striptags instead of raw), better safe than sorry
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://commons.wikimedia.org/wiki/Commons:Reusing_content_outside_Wikimedia and https://commons.wikimedia.org/wiki/Commons:Credit_line#Credit_lines_required_by_license doesn't seem to specifically require a link on the author, I guess the link to the image page is enough. To strip the author link shouldn't be an legal issue. In short, I'm OK with this change. |
||||||
| {% if asset.assetMetadata.license and asset.assetMetadata.license_url %} | ||||||
| under <a href="{{ asset.assetMetadata.license_url }}">{{ asset.assetMetadata.license }}</a> | ||||||
| {% endif %}. | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you want to inject Product name somehow . Wasn't sure if that worked in code snippets so hardcoded "Ibexa DXP"...