meta_query works locally but not on live server

I’m filtering posts by author’s last name initials. On my local server, the query runs beautifully, but when I push live, it doesn’t. It doesn’t find anything. Does it have anything to do with the way I’m escaping the custom field value? $author = get_query_var(‘author-initials’); if (!empty($author)) { $initials = explode(‘-‘, $author); $value = array(); … Read more

What is the HtmlSpecialChars equivalent in JavaScript?

Apparently, this is harder to find than I thought it would be. And it even is so simple… Is there a function equivalent to PHP’s htmlspecialchars built into JavaScript? I know it’s fairly easy to implement that yourself, but using a built-in function, if available, is just nicer. For those unfamiliar with PHP, htmlspecialchars translates … Read more

How do I escape a single quote ( ‘ ) in JavaScript? [duplicate]

This question already has answers here: Single quote escape in JavaScript function parameters (7 answers) Closed 9 years ago. UPDATE: I want to give an updated answer to this question. First, let me state if you’re attempting to accomplish what I have below, I recommend that you manage events by adding event listeners instead. I … Read more