aboutsummaryrefslogtreecommitdiffstats
path: root/docs/3_Developer_Guides/6_AFB_Helper_Guide/3.7.4_URL_Escaping.md
blob: c6f411c86f04b5afc3593ca8ea4ab4b6c6097d53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
edit_link: ''
title: URL escaping
origin_url: >-
  https://git.automotivelinux.org/src/libafb-helpers/plain/docs/escape.md?h=master
---

<!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/devguides/master/afb-helpers-function-references-afb-helpers-book.yml -->

# Escaping helpers functions reference

## char *escape_url(const char *base, const char *path, const char * const *args, size_t *length)

Escape an `url` and `arguments` and returned it as a string.

* `base`: representing the FQDN of the url.
* `path`: the path to the requested page.
* `args`: optionnal array of arguments provided for the GET request.
* `length`: length of the returned `url`.

Returns the escaped `url`.

## const char *escape_args(const char * const *args, size_t *length)

Escape an array of arguments and returned the lenght of the escaped arguments
string.

* `args`: array of arguments provided for the GET request.
* `length`: length of the returned `arguments`.

Returns the escaped `arguments`.

## const char *escape_str(const char *str, size_t *length)

Escape a string and returns it.

* `str`: the string to escape.
* `length`: length of the returned string.

Returns the escaped string.

## const char **unescape_args(const char *args)

Unescape an argument and returns it.

* `args`: the argument to unescape.