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

Manually picked from legacy kernel EE repo since extensions in 4.x are in separate repos.
stable-5.0: 0816e7bf8915373708fd4a67f671ae8ae351eee0