consistency with entity escaping

This commit is contained in:
rhiannon morris 2024-10-21 14:36:11 +02:00
parent 18629cb220
commit 645424a7d8
3 changed files with 8 additions and 5 deletions

View file

@ -64,7 +64,8 @@ escId = foldMap esc1 . Strict.unpack where
escAttr :: Strict.Text -> Builder
escAttr = foldMap esc1 . Strict.unpack where
esc1 c = fromMaybe (singleton c) $ lookup c
[('<', "&lt;"), ('>', "&gt;"), ('"', "&quot;"), ('\'', "&apos;")]
[('<', "&lt;"), ('>', "&gt;"), ('"', "&quot;"), ('\'', "&apos;"),
('&', "&amp;")]
class CanBuild a where build :: a -> Builder