Fix EZP-23086: Image thumbnail not shown on backend if alias contains quotes

JIRA: https://jira.ez.no/browse/EZP-23086

# Description

This PR completes the fix provided in #1019 to correctly handle the case where the URL contains several simple quotes.

# Tests

manual tests