diff options
author | Joris | 2015-09-02 17:38:46 +0200 |
---|---|---|
committer | Joris | 2015-09-02 17:38:46 +0200 |
commit | 02102713eae95fd6f42ff7681a640e43c5ba6d3d (patch) | |
tree | b22000da41aed0436cb2d40abb5ce901e8276e0e | |
parent | c17f89ef439a0b2e5a4511d8cdd55b2cfeb671b9 (diff) |
Authorize materials with spaces
-rw-r--r-- | src/Model/URL.hs | 7 |
1 files changed, 6 insertions, 1 deletions
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"] |