Escape html in _n_noop

wordpress

#1

How it is possible to escape html in _n_noop()? I cannot find the alternative for_n_noop().

_n_noop(
    /* translators: 1: plugin name(s). */
    'This theme requires the following plugin: %1$s.',
    'This theme requires the following plugins: %1$s.',
    'textdomain'
)

#2

When using _n_noop, to get the actual string for output you need to call translate_nooped_plural function. You can escape the output of that function, if needed. In your case it should look something like:

$message = _n_noop(
    /* translators: 1: plugin name(s). */
    'This theme requires the following plugin: %1$s.',
    'This theme requires the following plugins: %1$s.',
    'textdomain'
);
printf( esc_html( translate_nooped_plural( $message, $count, 'textdomain' ) ), esc_html( $plugin_names ) );