Skip to content

Commit

Permalink
fix file:/// as external link in summary
Browse files Browse the repository at this point in the history
  • Loading branch information
mamico committed Feb 4, 2025
1 parent 77bee35 commit cc3c72e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Changelog
5.6.4 (unreleased)
------------------

- fix file:/// as external link in summary
[mamico]

- Update it translations
[lucabel]

Expand Down
6 changes: 5 additions & 1 deletion src/redturtle/volto/restapi/serializer/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ def get_remote_url(self):
value = self.context.getRemoteUrl
if not value:
return ""
if value.startswith("http"):
if (
value.startswith("http:")
or value.startswith("https:")
or value.startswith("file:")
):
# it isn't an internal link, so we can return it
return value
path = replace_link_variables_by_paths(context=self.context, url=value)
Expand Down

0 comments on commit cc3c72e

Please sign in to comment.