r23527: Use existing escaping function pointed by James