I solved the problem. While kalhartt's answer did not completely apply to my problem, this part got me thinking:
Your best option is probably to escape the string in javascript before sending it and unescape it in your macro. Looks like you will need to escape all url unsafe characters, /, and ,.
As I wrote in my original question, WebIOPi calls macros like this
POST /macros/playVideo/a/b/c HTTP/1.1
where "playVideo" is the macro that is being called and anything here
/macros/playVideo/argument/
is an argument to be passed to the macro. The argument is only up to the forward slash after it, because after that slash there are no more categories (you used one slash to say you were going to call a macro, another slash to say the name of the macro, the third slash to pass arguments, and the fourth one for... what?).
This is why anything after a forward slash was being cut off. I solved the issue by replacing all forward slashes in javascript with
text = text.replace(/\//g,"fslash");
and then replacing "fslash" with "/" in the python script that was supposed to receive the argument. I also replaced question marks, since those were causing problems as well.