esc_attr with do_shortcode is applicable?

by The WP Novice   Last Updated November 15, 2017 06:08 AM

<?php echo do_shortcode($code_multiple); ?>

can we use esc_attr here and that would be a correct usage →

<?php echo esc_attr(do_shortcode($code_multiple)); ?>

My reason for asking is that I am not over sanitizing where it is not needed and code rendering may be a problem.

Related Questions

Shortcode putting html such as <img>

Updated January 10, 2018 05:08 AM

how to fix sansanitize_callback

Updated April 21, 2015 00:03 AM