API: Return URLs in escaped (percent-encoded) form
commitb79b4677f910d101f8f392fb1ec2618ddb4c38da
authorToni Gundogdu <legatvs@gmail.com>
Thu, 24 Oct 2013 18:26:04 +0000 (24 21:26 +0300)
committerToni Gundogdu <legatvs@gmail.com>
Thu, 24 Oct 2013 18:51:51 +0000 (24 21:51 +0300)
tree9c8dddccc650aede87cfc8212020fcc2a7703893
parent8e23664768e169be2085b3e8225b8ad27ac033d1
API: Return URLs in escaped (percent-encoded) form

- Extend `l_chk_s' and `l_chk_assign_s' functions to allow the caller
  set the `escape_url' arg to TRUE to tell the library to store the
  string value in URI escaped form

- All URLs returned by the library (e.g. media stream or thumbnail) are
  now stored in their escaped form, and passed as such to the
  applications querying them

- "Reserved chars" remain unescaped
  - https://tools.ietf.org/html/rfc3986#section-2.2

Affected API functions

- quvi_subtitle_lang_get (QUVI_SUBTITLE_LANG_PROPERTY_URL)
- quvi_playlist_get (QUVI_PLAYLIST_*_URL)
- quvi_media_get (QUVI_MEDIA_*_URL)

Rationale

- Address the potential problem of chars getting mangled when the URLs
  containing UTF8 chars are passed to the application trying to access
  the URL

Signed-off-by: Toni Gundogdu <legatvs@gmail.com>
src/api/media_get.c
src/api/playlist_get.c
src/api/subtitle_lang_get.c
src/lua/chk.c
src/lua/chk.h
src/lua/exec_media_script_parse.c
src/lua/exec_playlist_script_parse.c
src/lua/exec_subtitle_export_script_export.c
src/lua/exec_subtitle_export_script_ident.c
src/lua/exec_subtitle_script_parse.c