Mercurial Hosting > luan
comparison core/src/luan/modules/Html.luan @ 497:55f9f74f1e55
Http.request is now pure luan
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 17 May 2015 19:25:47 -0600 |
parents | 2f5cc9c2cbf0 |
children | 92c3d22745b8 |
comparison
equal
deleted
inserted
replaced
496:c65df5b25932 | 497:55f9f74f1e55 |
---|---|
11 | 11 |
12 local Luan = require "luan:Luan" | 12 local Luan = require "luan:Luan" |
13 local ipairs = Luan.ipairs | 13 local ipairs = Luan.ipairs |
14 local type = Luan.type | 14 local type = Luan.type |
15 local Io = require "luan:Io" | 15 local Io = require "luan:Io" |
16 local URLEncoder = require "java:java.net.URLEncoder" | |
17 | |
18 function url_encode(s) | |
19 return URLEncoder.encode(s,"UTF-8") | |
20 end | |
16 | 21 |
17 function process_url_tags(html) | 22 function process_url_tags(html) |
18 for i, v in ipairs(html) do | 23 for i, v in ipairs(html) do |
19 if type(v) == "table" and v.type == "tag" then | 24 if type(v) == "table" and v.type == "tag" then |
20 if v.name == "url" then | 25 if v.name == "url" then |