diff --git a/CHANGES.txt b/CHANGES.txt
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,9 @@
 Changelog for Extra
 
+1.6.11, released 2018-09-18
+    #38, make escapeHTML replace ' with &#39;
+1.6.10, released 2018-09-04
+    #37, make a duration/sleep test more robust (wider bounds)
 1.6.9, released 2018-07-12
     Add loop, the non-monadic version of loopM
     #36, add whenMaybe and whenMaybeM
diff --git a/extra.cabal b/extra.cabal
--- a/extra.cabal
+++ b/extra.cabal
@@ -1,7 +1,7 @@
 cabal-version:      >= 1.18
 build-type:         Simple
 name:               extra
-version:            1.6.9
+version:            1.6.11
 license:            BSD3
 license-file:       LICENSE
 category:           Development
diff --git a/src/Data/List/Extra.hs b/src/Data/List/Extra.hs
--- a/src/Data/List/Extra.hs
+++ b/src/Data/List/Extra.hs
@@ -285,12 +285,11 @@
 
 -- | Escape a string such that it can be inserted into an HTML document or @\"@ attribute
 --   without any special interpretation. This requires escaping the @<@, @>@, @&@ and @\"@ characters.
---   Note that it does /not/ escape @\'@, so will not work when placed in a @\'@ delimited attribute.
---   Also note that it will escape @\"@ even though that is not required in an HTML body (but is not harmful).
+--   Note that it will escape @\"@ and @\'@ even though that is not required in an HTML body (but is not harmful).
 --
 -- > escapeHTML "this is a test" == "this is a test"
 -- > escapeHTML "<b>\"g&t\"</n>" == "&lt;b&gt;&quot;g&amp;t&quot;&lt;/n&gt;"
--- > escapeHTML "don't" == "don't"
+-- > escapeHTML "t'was another test" == "t&#39;was another test"
 escapeHTML :: String -> String
 escapeHTML = concatMap f
     where
@@ -298,6 +297,7 @@
         f '<' = "&lt;"
         f '&' = "&amp;"
         f '\"' = "&quot;"
+        f '\'' = "&#39;"
         f x = [x]
 
 -- | Invert of 'escapeHTML' (does not do general HTML unescaping)
@@ -309,6 +309,7 @@
     | Just xs <- stripPrefix "gt;" xs = '>' : unescapeHTML xs
     | Just xs <- stripPrefix "amp;" xs = '&' : unescapeHTML xs
     | Just xs <- stripPrefix "quot;" xs = '\"' : unescapeHTML xs
+    | Just xs <- stripPrefix "#39;" xs = '\'' : unescapeHTML xs
 unescapeHTML (x:xs) = x : unescapeHTML xs
 unescapeHTML [] = []
 
diff --git a/src/System/Time/Extra.hs b/src/System/Time/Extra.hs
--- a/src/System/Time/Extra.hs
+++ b/src/System/Time/Extra.hs
@@ -63,7 +63,7 @@
     | otherwise = do
         pid <- myThreadId
         ex  <- fmap Timeout newUnique
-        handleBool (== ex) 
+        handleBool (== ex)
                    (const $ return Nothing)
                    (bracket (forkIOWithUnmask $ \unmask -> unmask $ sleep n >> throwTo pid ex)
                             killThread
@@ -107,7 +107,7 @@
 
 -- | Record how long a computation takes in 'Seconds'.
 --
--- > do (a,_) <- duration $ sleep 1; return $ a >= 1 && a <= 1.1
+-- > do (a,_) <- duration $ sleep 1; return $ a >= 1 && a <= 1.5
 duration :: IO a -> IO (Seconds, a)
 duration act = do
     time <- offsetTime
diff --git a/test/TestGen.hs b/test/TestGen.hs
--- a/test/TestGen.hs
+++ b/test/TestGen.hs
@@ -142,7 +142,7 @@
     testGen "line1 \"test\\nrest\\nmore\" == (\"test\",\"rest\\nmore\")" $ line1 "test\nrest\nmore" == ("test","rest\nmore")
     testGen "escapeHTML \"this is a test\" == \"this is a test\"" $ escapeHTML "this is a test" == "this is a test"
     testGen "escapeHTML \"<b>\\\"g&t\\\"</n>\" == \"&lt;b&gt;&quot;g&amp;t&quot;&lt;/n&gt;\"" $ escapeHTML "<b>\"g&t\"</n>" == "&lt;b&gt;&quot;g&amp;t&quot;&lt;/n&gt;"
-    testGen "escapeHTML \"don't\" == \"don't\"" $ escapeHTML "don't" == "don't"
+    testGen "escapeHTML \"t'was another test\" == \"t&#39;was another test\"" $ escapeHTML "t'was another test" == "t&#39;was another test"
     testGen "\\xs -> unescapeHTML (escapeHTML xs) == xs" $ \xs -> unescapeHTML (escapeHTML xs) == xs
     testGen "escapeJSON \"this is a test\" == \"this is a test\"" $ escapeJSON "this is a test" == "this is a test"
     testGen "escapeJSON \"\\ttab\\nnewline\\\\\" == \"\\\\ttab\\\\nnewline\\\\\\\\\"" $ escapeJSON "\ttab\nnewline\\" == "\\ttab\\nnewline\\\\"
@@ -274,4 +274,4 @@
     testGen "showDuration 62003.8 == \"17h13m\"" $ showDuration 62003.8 == "17h13m"
     testGen "showDuration 1e8     == \"27777h47m\"" $ showDuration 1e8     == "27777h47m"
     testGen "do f <- offsetTime; xs <- replicateM 10 f; return $ xs == sort xs" $ do f <- offsetTime; xs <- replicateM 10 f; return $ xs == sort xs
-    testGen "do (a,_) <- duration $ sleep 1; return $ a >= 1 && a <= 1.1" $ do (a,_) <- duration $ sleep 1; return $ a >= 1 && a <= 1.1
+    testGen "do (a,_) <- duration $ sleep 1; return $ a >= 1 && a <= 1.5" $ do (a,_) <- duration $ sleep 1; return $ a >= 1 && a <= 1.5
