I’m using the Admin API and have a post title with an apostrophe in it. I need to search the Admin API to find it. The admin api docs refer to the content api docs, which say:
Single or Double quote __MUST __be escaped*
See that asterisk? It doesn’t go anywhere. I’ve tried url encoding my ', which doesn’t break anything, but doesn’t match the post title either. I’ve tried not encoding, but that breaks everything, because it messes up the filter syntax.
I could use a hint.
Frustratedly yours…
And I should be a better poster and provide more details. Sample code:
// attempt 1
let title = `What's Happening in Golden - ${date}`
let titleFilter = `title:"${title}"`;
let postExists = await api.posts.browse({filter: titleFilter});
// ^^ throws an error: "Request not understood error, cannot list posts." "context":"Error parsing filter"
// attempt 2
let title = `What%27s Happening in Golden - ${date}`
let titleFilter = `title:"${title}"`;
let postExists = await api.posts.browse({filter: titleFilter});
// ^^ Same error