theme localization: wp_kses wrapper

Hi everyone!

Had a trouble with soft reject :slight_smile:

I have an input in searchform.php:
<input type="text" name="s" placeholder="<?php _e('Search', 'relea'); ?>" value="<?php the_search_query(); ?>">

(‘relea’ is the domain)

Reviewer said that this line
placeholder="<?php _e('Search', 'relea'); ?>"
is translated incorrectly and attached this link: https://gist.github.com/kailoon/01fa8e95d2e910e666c6

And I’m totally confused: the start of this topic and the official WP manuals say __(); and _e(); functions are correct way to translate strings.
But someone in topic comments wrote: “The new standard is: __() and _e() can only be used if you wrap them in wp_kses()” (btw, official WP manual and Envato Requirements doesn’t say about wp_kses wrapper).

Ok, I tried to uses wp_kses wrapper, but it is not working - WP just stop to render this input.

Help please, what reviewers want from me? How to correct translate this case? Where I can read about this requirement in official sources?

Thanks in advance,
iltaen

I am using in my themes:

esc_attr__

So, it will be:

placeholder="<?php esc_attr__('Search', 'relea'); ?>"

thank you! I’ll try to use it.

but esc_attr__() wasn’t described in https://gist.github.com/kailoon/01fa8e95d2e910e666c6
as a way to translating :thinking:

(Maybe use esc_html_e(); in my case?..)

Yes, if you need “echo” then esc_attr_e()

Hi

yes, you are right. you can use:

<?php esc_html_e( 'Search', 'relea'); ?>

and it will be fine for you.

Thanks