diff options
Diffstat (limited to '')
-rw-r--r-- | lib/Util.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Util.hs b/lib/Util.hs index 18dfb5b..948b725 100644 --- a/lib/Util.hs +++ b/lib/Util.hs @@ -35,6 +35,7 @@ instance PrettyPrint PropertyValue where prettyprint = \case StrProp str -> str BoolProp bool -> if bool then "true" else "false" + IntProp int -> showText int -- | here since Unit is sometimes used as dummy type instance PrettyPrint () where @@ -54,3 +55,8 @@ layerIsEmpty :: Layer -> Bool layerIsEmpty layer = case layerData layer of Nothing -> True Just d -> all ((==) $ mkTiledId 0) d + +-- | naive escaping of html sequences, just to be sure that +-- | workadventure won't mess things up again … +naiveEscapeHTML :: Text -> Text +naiveEscapeHTML = T.replace "<" "<" . T.replace ">" ">" |