mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-27 22:50:42 +00:00
Adds ast_escape_encoded utility to properly handle escaping of quoted field before uri.
This commit backports a feature in trunk affecting initreqprep so that display name won't be encoded improperly. Also includes unit tests for the ast_escape_quoted function. This patch gives 1.8 a much improved outlook in countries which don't use standard ASCII characters. (closes issue ASTERISK-16949) Reported by: Örn Arnarson Review: https://reviewboard.asterisk.org/r/1235/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@322585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -273,6 +273,19 @@ char *ast_uri_encode(const char *string, char *outbuf, int buflen, int do_specia
|
||||
*/
|
||||
void ast_uri_decode(char *s);
|
||||
|
||||
/*!
|
||||
* \brief Escape characters found in a quoted string.
|
||||
*
|
||||
* \note This function escapes quoted characters based on the 'qdtext' set of
|
||||
* allowed characters from RFC 3261 section 25.1.
|
||||
*
|
||||
* \param string string to be escaped
|
||||
* \param outbuf resulting escaped string
|
||||
* \param buflen size of output buffer
|
||||
* \return a pointer to the escaped string
|
||||
*/
|
||||
char *ast_escape_quoted(const char *string, char *outbuf, int buflen);
|
||||
|
||||
static force_inline void ast_slinear_saturated_add(short *input, short *value)
|
||||
{
|
||||
int res;
|
||||
|
||||
Reference in New Issue
Block a user