From 02102713eae95fd6f42ff7681a640e43c5ba6d3d Mon Sep 17 00:00:00 2001 From: Joris Date: Wed, 2 Sep 2015 17:38:46 +0200 Subject: Authorize materials with spaces --- src/Model/URL.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Model/URL.hs b/src/Model/URL.hs index 76a9e86..04fcf6b 100644 --- a/src/Model/URL.hs +++ b/src/Model/URL.hs @@ -13,7 +13,12 @@ import qualified Data.Text as T type URL = Text getIdURL :: Text -> URL -getIdURL material = T.concat [site, "/ajax/global.php?term=", material] +getIdURL material = + T.concat + [ site + , "/ajax/global.php?term=" + , T.replace " " "+" material + ] getMaterialURL :: Text -> URL getMaterialURL materialId = T.concat [site, "/fiche-matiere-", materialId, ".php"] -- cgit v1.2.3