[BUGFIX] Cannot insert image in the RTE if domain contains a minus

Change-Id: I212b54c4219ea50a40a95b7854ead7167b4b62a1
Releases: 2.x
Resolves: #56528