diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6137864..ca693de 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -31,6 +31,7 @@ jobs: path: eggs key: ${{ runner.OS }}-build-python${{ matrix.python }}-${{ matrix.plone }} - name: Set up Python ${{ matrix.python }} + # don't upgrade this action version, as we want to support plone52/py38 uses: actions/setup-python@v3 with: python-version: ${{ matrix.python }} diff --git a/.github/workflows/zpretty.yml b/.github/workflows/zpretty.yml index 180f0e9..154b42a 100644 --- a/.github/workflows/zpretty.yml +++ b/.github/workflows/zpretty.yml @@ -6,20 +6,20 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.8] + python-version: [3.11] steps: # git checkout - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 # python setup - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} # python cache - - uses: actions/cache@v1 + - uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} diff --git a/CHANGES.rst b/CHANGES.rst index 4134f11..e217598 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,9 @@ Changelog 5.6.4 (unreleased) ------------------ +- fix file:/// as external link in summary + [mamico] + - Update it translations [lucabel] diff --git a/src/redturtle/volto/restapi/serializer/summary.py b/src/redturtle/volto/restapi/serializer/summary.py index f1b49bb..5cc8222 100644 --- a/src/redturtle/volto/restapi/serializer/summary.py +++ b/src/redturtle/volto/restapi/serializer/summary.py @@ -81,9 +81,15 @@ def get_remote_url(self): value = self.context.getRemoteUrl if not value: return "" - if value.startswith("http"): - # it isn't an internal link, so we can return it + + # it isn't an internal link, so we can return it + if value.startswith("http:"): + return value + if value.startswith("https:"): return value + if value.startswith("file:"): + return value + path = replace_link_variables_by_paths(context=self.context, url=value) url = uid_to_url(path)