How to prevent spaces (and other special characters) in audio URLs from crashing the system?

Currently, when analyzing prompts and script parameters, VoIP Drupal assumes that anything that starts with the percentage symbol is a VoIP Script variable. Unfortunately, PHP automatically calls rawurlencode() to encode special file name characters with their RFC 3986 equivalent. By doing so, file names such as "my file.mp3" become "my%20file.mp3", which leads VoIP Drupal to search for a variable called "20file.mp3"

Comments

tamerzg’s picture

Version: 6.x-1.0-beta9 » 6.x-1.x-dev
Status: Active » Needs review

This issue is fixed in latest dev branch, by extending regex to allow only variables that starts with alphabetic letter or underscore. This will not conflict anymore with url encoded characters like %20

Also this introduced another problem and that was with Tropo library, they are using sprintf() and "%" character is the formatting character used by sprintf, so had to add fix to voiptropo.inc to escape it with another "%" as posted here:
https://www.tropo.com/bizblog/viewer?&bb-name=tropo_support&bb-q=sprintf...