You are reading a single comment by @Robin and its replies. Click here to read the full conversation.
  • However it's not desperately helpful for what you're trying to do. You could try decodeURIComponent(els[1].replace(/+/g,"­ "));

    That is exactly what I do to fix it but I thought that decodeURIComponent should already result the same.
    It seems that it is my fault. Why are spaces something so special?

    application/x-www-form-urlencoded Default. All characters are encoded before sent (spaces are converted to "+" symbols, and special characters are converted to ASCII HEX values)
    https://www.w3schools.com/tags/att_form_­enctype.asp

    I expected that a space would be

     U+0020		 	Space
    

    not just an "+".

    Confusing for me :)

    Thank you for your help!

    PS: Espruino is very cool :)

About

Avatar for Robin @Robin started