Issue: I've written a mod that can take a string as an argument to a slash command. This string might contain apostrophes. Obviously, my slash command handler doesn't like this. More accurately, the input is being passed to GetItemInfo(), which is where the problem comes in.
Question: What's the proper way to formalize the input? A simple gsub to escape the ' doesn't seem to be effective.
SlashCmdList["MINER"] = function(input)
_, link = GetItemInfo(input)
if not link then
A command like "/miner Warglaive of Azzinoth" or "/miner 45525" works just fine and prints the item link. Trying to run "/miner Relic Hunter's Cord" returns nil. I've checked the arguments that are being passed to the function and a string like "Relic Hunter's Cord" makes it there intact. The call "/print GetItemInfo("Relic Hunter's Cord")" returns nil as well.
I doubt it matters, but Print is just a ripoff of AceConsole's Print function.