How to escape string characters on sms notification?

Alonso Basauri2 years ago

I'm sending SMS notifications including address as such: $position.address , the problem is that I'm getting the messages with wrong characters or unescaped strings like "Ignition ON at: 199 León López Sanabria", is there a function inside the template engine to escape the characters á é í ó ú ?

Thanks in advance and thanks for the great work on traccar :)

Anton Tananaev2 years ago

What SMS provider are you using?

Alonso Basauri2 years ago

Hello, I'm using the traccar SMS Gateway official app, greetings!

Alonso Basauri2 years ago

Hello Anton, I've narrowed the problem to the SMS Gateway app because I got the same error with curl:

curl --location --request POST 'http://192.168.1.78:8082/' \
--header 'Authorization: 8a326fb0' \
--header 'Content-Type: text/plain' \
--data-raw '{
        "to": "+523327847531",
        "message": "Hola á é í ó ú"
    }'

And still weird characters. Any help would be appreciated!

Anton Tananaev2 years ago

It might not be supported.

Alonso Basauri2 years ago

Ok, Anton, I may try to proxy the requests and remove the special characters then. Thanks a lot for the help and the great work with Traccar!