I have recently installed modules SMS Framework 6.x-2.x-dev (and SMS Vianett 6.x-1.0-beta1 as gateway).
I did try the Send To Phone feature, which lets you send current website page's link as SMS text to any mobilephonenumber entered in the textfield, and it works. But the sent link is broken in the received SMS text message.
Example if I send 'http://www.domain.com/news' it will display in the receiver's SMS as 'http:/%2Fwww.domain.com/news'.
I was told that the input needs URL encode before it is sent to a gateway server. The URL has to be converted into a valid ASCII format. Further, PHP has a rawurlencode() function.
But I don't know how to use it...
Where could it possible be wrong? Is there any way to fix this in this module?
// I would appreciate any suggestions!!
Comments
Comment #1
univate commented%2F is the '/' character - http://www.w3schools.com/tags/ref_urlencode.asp
A fix for this is more likely going to need to be made in the sms vianett module.
Comment #2
miccelito commentedThanks for reply
Yes, you're surely right. I had a look at the sms_vianett.module and I guess the error comes from the code that seems to need a fix.
At line 97 in the sms_vianett.module:
$msg = drupal_urlencode($data['message']);I guess instead it should be something like:
or
or
Comment #3
miccelito commentedProblem solved, a small change in the module's code was needed for correct URL encoding.
$msg = drupal_urlencode($data['message']);$msg = rawurlencode($data['message']);
Comment #3.0
miccelito commentedAdded more info to the issue