esc_html__ and special character in WordPress

44 views Asked by At

I use esc_html__ in my below code:

esc_html__( 'Best & Sea', 'textdomain' );

When I use the above code the special character & is not displayed.

How to fix this issue?

1

There are 1 answers

0
Thomas Pecriaux On

Try

echo html_entity_decode(esc_html__('Best & Sea', 'textdomain'));