diff options
| author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2005-11-21 07:04:18 +0000 |
|---|---|---|
| committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2005-11-21 07:04:18 +0000 |
| commit | 71f483496de874f1200526816528b7b2a4e9e4a6 (patch) | |
| tree | 81f8c6b4e3888bf2d47fe131541c5cd18e739e62 | |
| parent | 5e09779c7f6b1710150d5a0f12d86ded7ede75c6 (diff) | |
| download | luasocket-71f483496de874f1200526816528b7b2a4e9e4a6.tar.gz luasocket-71f483496de874f1200526816528b7b2a4e9e4a6.tar.bz2 luasocket-71f483496de874f1200526816528b7b2a4e9e4a6.zip | |
Works in Finnish now! Who would say...
| -rw-r--r-- | src/url.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/url.lua b/src/url.lua index 52e88da..135d723 100644 --- a/src/url.lua +++ b/src/url.lua | |||
| @@ -55,9 +55,9 @@ local segment_set = make_set { | |||
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | local function protect_segment(s) | 57 | local function protect_segment(s) |
| 58 | return string.gsub(s, "(%W)", function (c) | 58 | return string.gsub(s, "([^A-Za-z0-9_])", function (c) |
| 59 | if segment_set[c] then return c | 59 | if segment_set[c] then return c |
| 60 | else return escape(c) end | 60 | else return string.format("%%%02x", string.byte(c)) end |
| 61 | end) | 61 | end) |
| 62 | end | 62 | end |
| 63 | 63 | ||
