When do I need to use esc_attr when using WordPress internal functions
You can look at the Codex. Encodes < > & ” ‘ (less than, greater than, ampersand, double quote, single quote). Will never double encode entities. Given that, arguably, both of those strings need sanitization. Imagine a site name like >> “My” Website’s Great Title <<” Also, since you are using this in Javascript, you … Read more