I've been using Mathematica for a few years, and today decided to have a first play with the Wolfram Cloud, to get a feel for how to deploy a function. I set up a very basic function that, when called via its url with the correct parameters, should interpret the argument as a Wolfram Language expression, and return it:
CloudDeploy@APIFunction[{"p"->"Expression"},#&,"WL"]
When called, this mainly seems to work, returning an association with the evaluated expression, e.g
https://www.wolframcloud.com/objects/cccb5437-d414-4af2-93eb-d7d976970f63?p=Sin[x]/Cos[x]
returns
<|"p" -> Tan[x]|>
as I would expect from Mathematica. Similarly, attaching "p=Cos[Pi]" to the url returns <|"p"-> -1|>, for example.
But there seems to be a bug where "+" is interpreted as "*". So calling
https://www.wolframcloud.com/objects/cccb5437-d414-4af2-93eb-d7d976970f63?p=2+3
returns
<|"p" -> 6|>
for example.
I have tried this with quite a few expressions, both in Firefox on a thin client PC, and Chrome on my Android phone, and the behaviour is consistent. However, calling the url with "p=Plus[2,3]", for example, returns the correct result. Also using
APIFunction[{"p"->"Expression"},#&,"WL"][<|"p"->"2+3"|>]
in the cloud notebook returns
<|p->5|>
as expected. Could this be a bug with the way "+" is interpreted when in an url, or am I doing something daft?