Further enhance esc_attr function