OVT-7620: Trim strings before ordering