Escape ampersand characters to the corresponding entity in the `Versions` class

Signed-off-by: xchs <github@gmx.net>
Merge pull request #5581 from xchs/fix-amp-escape