Question about escaping data in the front end
-
Hi,
I have 2 questions about escaping data in frontend of my website.
1) Should I escape a sprintf itself?
sprintf(__( 'Date: %s', 'mytextdomain' ), date_i18n( get_option( 'date_format' ), $date ) );
Currently I only escape the $date part:
$date = esc_html(get_post_meta( get_the_ID(), 'date', true ));
2) As displayed above, I escape the get_post_meta, should this be escaped?
Guido
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Question about escaping data in the front end’ is closed to new replies.