Escaping get_theme_mod()

tips-and-tricks

#1

Hello there!

I need to put some nice text in footer and include in that text also an icon (fontawsome). I know that everything that comes from the user should be escaped like this esc_attr(get_theme_mod(‘my_copyright_text’)) that means the icon will be escaped too…and will be printed as below.

2015 Kiddie Theme developed with <i style="color:#fd3d38" class="fa fa-heart"></i> by Zoutula

What is your technical solution here …that is allowed by themeforest reviewers?

Thanks


#2

You should use wp_kses()