What is proper strings escaping in WordPress?

There is the following line in WordPress theme that got rejected with the reason of wrong string escaping.

Can anybody advise, what would be the correct string escaping in this case?

<?php next_comments_link( __( 'Newer Comments →', 'expedition' ) ); ?>

Here it is: https://codex.wordpress.org/Function_Reference/esc_html_2

The following should be sufficient

<?php next_comments_link( esc_html_e( 'Newer Comments &rarr;', 'expedition' ) ); ?>

https://codex.wordpress.org/Function_Reference/esc_html_e

1 Like

Thanks guys!