aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Network/HTTP.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Network/HTTP.hs')
-rw-r--r--src/Text/Pandoc/Network/HTTP.hs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Network/HTTP.hs b/src/Text/Pandoc/Network/HTTP.hs
new file mode 100644
index 000000000..89f7f5544
--- /dev/null
+++ b/src/Text/Pandoc/Network/HTTP.hs
@@ -0,0 +1,18 @@
+{- |
+ Module : Text.Pandoc.Writers.Markdown.Inline
+ Copyright : Copyright (C) 2006-2021 John MacFarlane
+ License : GNU GPL, version 2 or above
+
+ Maintainer : John MacFarlane <jgm@berkeley.edu>
+ Stability : alpha
+ Portability : portable
+-}
+module Text.Pandoc.Network.HTTP (
+ urlEncode
+ ) where
+import qualified Network.HTTP.Types as HTTP
+import qualified Text.Pandoc.UTF8 as UTF8
+import qualified Data.Text as T
+
+urlEncode :: T.Text -> T.Text
+urlEncode = UTF8.toText . HTTP.urlEncode True . UTF8.fromText