Add ' to allowed characters in LegacyLocator validation (#13329)

Change-Id: I2503ce46b1abbf2fd237eaff538d77e565d25eb6