luup.inet.wget - problem

I’d like to use the command luup.inet.wget(“”) in a device implementation file for a new plugin:

luup.inet.wget("http://" .. ipAddress .. ":" ..port .. "/system?arg0=send_key&arg1=" ..url)

This almost works. Basically only the symbol “&” makes problems. As soon as I remove this symbol from the device implementation file everything runs fine, but of course I am then missing the symbol & in my http call.

When I have the & in the device implementation file and I try to click a button de UI says “device not ready” or “no implementation”.

So basically the implementation file becomes faulty if I use the symbol “&”, but I still need to have it in my http call. I don’t seem to be able fo figure that out myself and I hope someone can help me. Can anybody tell me how I can make luup.inet.wget call “10.0.0.100:8008/system?arg0=send_key&arg1=right”? The ipaddress, the port and the argument 1 (url) have to be implemented as variables (as in the example above).

Write & (ampersand a m p semicolon) instead of & (here’s why: the implementation file is XML, so any time that you want a literal ampersand you have to escape it. By the time the string gets to the Lua interpreter you have the & character that you want).

You are a hero and I’m a fool… :-[

Thank you very much for explaining in detail and not just laughing! Sorry for my lack of general programming knowledge, I didn’t even know how that symbol is called in English.