MDL-24282 improved s() to deal better with hex encoded entities