Switch to esc_attr

Fixes issue #2372