[asterisk-bugs] [Asterisk 0014942]: New function to escape any character in a string

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Apr 20 17:02:13 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14942 
====================================================================== 
Reported By:                ajohnson
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   14942
Category:                   Functions/func_strings
Reproducibility:            have not tried
Severity:                   feature
Priority:                   normal
Status:                     new
Asterisk Version:           1.6.0.6 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-04-20 15:46 CDT
Last Modified:              2009-04-20 17:02 CDT
====================================================================== 
Summary:                    New function to escape any character in a string
Description: 
I was having issues with ODBC functions in Asterisk.  Asterisk was
interperating a comma as a delimiter, even if it was contained in a
variable that I was passing as a value to the function.  This may be
correct, but I needed a function to escape commas inside of variables I was
passing to an ODBC function.

The new function's name is ESCAPE(<escape-chars>|<string>).  It will
escape every instance of the characters specified inside of the given
string.

I am not a C programmer and I apologize for not uploading this as a diff
against trunk.
====================================================================== 

---------------------------------------------------------------------- 
 (0103502) ajohnson (reporter) - 2009-04-20 17:02
 http://bugs.digium.com/view.php?id=14942#c103502 
---------------------------------------------------------------------- 
Quoting the argument does not work (at least not in 1.4).  I tried quotes,
escaped quotes, single quotes, and escaped single quotes.  I originally
wrote this patch a against 1.4. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-04-20 17:02 ajohnson       Note Added: 0103502                          
======================================================================




More information about the asterisk-bugs mailing list