diff --git a/CHANGES.md b/CHANGES.md
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,6 +1,19 @@
 User-visible changes in hledger-web.
 See also the hledger changelog.
 
+# 1.19 2020-09-01
+
+- Queries containing a malformed regular expression (eg the single
+  character `?`) now show a tidy error message instead "internal
+  server error" (Stephen Morgan, Simon Michael) (#1245)
+
+- In account registers, a transaction dated outside the report period
+  now is not shown even if it has postings dated inside the report
+  period.
+
+- Added a missing lower bound for aeson, making cabal installs more
+  reliable. (#1268)
+
 # 1.18.1 2020-06-21
 
 - fix some doc typos (Martin Michlmayr)
diff --git a/Hledger/Web/Foundation.hs b/Hledger/Web/Foundation.hs
--- a/Hledger/Web/Foundation.hs
+++ b/Hledger/Web/Foundation.hs
@@ -16,6 +16,7 @@
 
 module Hledger.Web.Foundation where
 
+import Control.Applicative ((<|>))
 import Control.Monad (join, when)
 import qualified Data.ByteString.Char8 as BC
 import Data.Traversable (for)
@@ -119,8 +120,10 @@
     hideEmptyAccts <- (== Just "1") . lookup "hideemptyaccts" . reqCookies <$> getRequest
 
     let ropts = reportopts_ (cliopts_ opts)
-        -- flip the default for items with zero amounts, show them by default
-        ropts' = ropts { empty_ = not (empty_ ropts) }
+        ropts' = ropts
+          {accountlistmode_ = ALTree  -- force tree mode for sidebar
+          ,empty_           = not (empty_ ropts)  -- show zero items by default
+          }
         accounts =
           balanceReportAsHtml (JournalR, RegisterR) here hideEmptyAccts j q qopts $
           balanceReport ropts' m j
@@ -199,14 +202,25 @@
   App {appOpts = opts, appJournal} <- getYesod
   today <- liftIO getCurrentDay
   let copts = cliopts_ opts
-  (j, merr) <-
-    getCurrentJournal
-      appJournal
-      copts {reportopts_ = (reportopts_ copts) {no_elide_ = True}}
-      today
-  maybe (pure ()) (setMessage . toHtml) merr
+
+  -- try to read the latest journal content, keeping the old content
+  -- if there's an error
+  (j, mjerr) <- getCurrentJournal
+                appJournal
+                copts {reportopts_ = (reportopts_ copts) {no_elide_ = True}}
+                today
+
+  -- try to parse the query param, assuming no query if there's an error
   q <- fromMaybe "" <$> lookupGetParam "q"
-  let (m, qopts) = parseQuery today q
+  (m, qopts, mqerr) <- do
+    case parseQuery today q of
+      Right (m, qopts) -> return (m, qopts, Nothing)
+      Left err         -> return (Any, [], Just err)
+
+  -- if either of the above gave an error, display it
+  maybe (pure ()) (setMessage . toHtml) $ mjerr <|> mqerr
+
+  -- do some permissions checking
   caps <- case capabilitiesHeader_ opts of
     Nothing -> return (capabilities_ opts)
     Just h -> do
@@ -214,7 +228,8 @@
       fmap join . for (join hs) $ \x -> case capabilityFromBS x of
         Left e -> [] <$ addMessage "" ("Unknown permission: " <> toHtml (BC.unpack e))
         Right c -> pure [c]
-  return VD {opts, today, j, q, m, qopts, caps}
+
+  return VD{opts, today, j, q, m, qopts, caps}
 
 checkServerSideUiEnabled :: Handler ()
 checkServerSideUiEnabled = do
diff --git a/Hledger/Web/Handler/RegisterR.hs b/Hledger/Web/Handler/RegisterR.hs
--- a/Hledger/Web/Handler/RegisterR.hs
+++ b/Hledger/Web/Handler/RegisterR.hs
@@ -86,7 +86,7 @@
             let (link, xs1) = span (isJust . fst) xs0
                 (comma, xs2) = span (isNothing . fst) xs1
             in (acct, (map snd link, map snd comma)) : undecorateLinks xs2
-        _ -> error "link name not decorated with account"
+        _ -> error "link name not decorated with account"  -- PARTIAL:
 
 decorateLinks :: [(acct, ([char], [char]))] -> [(Maybe acct, char)]
 decorateLinks =
diff --git a/Hledger/Web/WebOptions.hs b/Hledger/Web/WebOptions.hs
--- a/Hledger/Web/WebOptions.hs
+++ b/Hledger/Web/WebOptions.hs
@@ -128,13 +128,13 @@
   checkWebOpts <$> do
     cliopts <- rawOptsToCliOpts rawopts
     let h = fromMaybe defhost $ maybestringopt "host" rawopts
-        p = fromMaybe defport $ maybeintopt "port" rawopts
+        p = fromMaybe defport $ maybeposintopt "port" rawopts
         b =
           maybe (defbaseurl h p) stripTrailingSlash $
           maybestringopt "base-url" rawopts
         caps' = join $ T.splitOn "," . T.pack <$> listofstringopt "capabilities" rawopts
         caps = case traverse capabilityFromText caps' of
-          Left e -> error' ("Unknown capability: " ++ T.unpack e)
+          Left e -> error' ("Unknown capability: " ++ T.unpack e)  -- PARTIAL:
           Right [] -> [CapView, CapAdd]
           Right xs -> xs
         sock = stripTrailingSlash <$> maybestringopt "socket" rawopts
diff --git a/Hledger/Web/Widget/AddForm.hs b/Hledger/Web/Widget/AddForm.hs
--- a/Hledger/Web/Widget/AddForm.hs
+++ b/Hledger/Web/Widget/AddForm.hs
@@ -91,7 +91,7 @@
 
     listField = Field
       { fieldParse = const . pure . Right . Just . dropWhileEnd T.null
-      , fieldView = error "Don't render using this!"
+      , fieldView = error "Don't render using this!"  -- PARTIAL:
       , fieldEnctype = UrlEncoded
       }
 
@@ -106,16 +106,13 @@
         intercalate "," $ map (
           ("{\"value\":" ++).
           (++"}").
-          escapeJSSpecialChars .
-          drop 7 .  -- "String "
           show .
-          toJSON
+          -- avoid https://github.com/simonmichael/hledger/issues/236
+          T.replace "</script>" "<\\/script>"
           ) ts,
         "]"
         ]
       where
-        -- avoid https://github.com/simonmichael/hledger/issues/236
-        escapeJSSpecialChars = regexReplaceCI "</script>" "<\\/script>"
 
 validateTransaction ::
      FormResult Day
diff --git a/Hledger/Web/Widget/Common.hs b/Hledger/Web/Widget/Common.hs
--- a/Hledger/Web/Widget/Common.hs
+++ b/Hledger/Web/Widget/Common.hs
@@ -72,7 +72,7 @@
   -- Ensure unix line endings, since both readJournal (cf
   -- formatdirectivep, #1194) writeFileWithBackupIfChanged require them.
   -- XXX klunky. Any equivalent of "hSetNewlineMode h universalNewlineMode" for form posts ?
-  let t' = T.pack $ regexReplace "\r" "" $ T.unpack t
+  let t' = T.replace "\r" "" t
   liftIO (readJournal def (Just f) t') >>= \case
     Left e -> return (Left e)
     Right _ -> do
@@ -102,7 +102,7 @@
 
 mixedAmountAsHtml :: MixedAmount -> HtmlUrl a
 mixedAmountAsHtml b _ =
-  for_ (lines (showMixedAmountWithoutPrice b)) $ \t -> do
+  for_ (lines (showMixedAmountWithoutPrice False b)) $ \t -> do
     H.span ! A.class_ c $ toHtml t
     H.br
   where
diff --git a/hledger-web.1 b/hledger-web.1
--- a/hledger-web.1
+++ b/hledger-web.1
@@ -1,5 +1,5 @@
 
-.TH "hledger-web" "1" "June 2020" "hledger-web 1.18.1" "hledger User Manuals"
+.TH "hledger-web" "1" "September 2020" "hledger-web 1.18.99" "hledger User Manuals"
 
 
 
@@ -186,6 +186,15 @@
 generate future transactions from periodic transaction rules, for the
 next 6 months or till report end date.
 In hledger-ui, also make ordinary future transactions visible.
+.TP
+\f[B]\f[CB]--color=WHEN (or --colour=WHEN)\f[B]\f[R]
+Should color-supporting commands use ANSI color codes in text output.
+\[aq]auto\[aq] (default): whenever stdout seems to be a color-supporting
+terminal.
+\[aq]always\[aq] or \[aq]yes\[aq]: always, useful eg when piping output
+into \[aq]less -R\[aq].
+\[aq]never\[aq] or \[aq]no\[aq]: never.
+A NO_COLOR environment variable overrides this.
 .PP
 When a reporting option appears more than once in the command line, the
 last one takes precedence.
diff --git a/hledger-web.cabal b/hledger-web.cabal
--- a/hledger-web.cabal
+++ b/hledger-web.cabal
@@ -4,10 +4,10 @@
 --
 -- see: https://github.com/sol/hpack
 --
--- hash: b9fe1e4cec4d0a8e356fcc4c378ce3412016f5412f4866674881959eb9492224
+-- hash: 3781a0068e7647eb59ffb0c20198955f86df134e69d18ed657cbddf233258217
 
 name:           hledger-web
-version:        1.18.1
+version:        1.19
 synopsis:       Web-based user interface for the hledger accounting system
 description:    A simple web-based user interface for the hledger accounting system,
                 providing a more modern UI than the command-line or terminal interfaces.
@@ -151,10 +151,10 @@
   hs-source-dirs:
       ./.
   ghc-options: -Wall -fwarn-tabs -Wcompat -Wincomplete-uni-patterns -Wincomplete-record-updates -Wredundant-constraints
-  cpp-options: -DVERSION="1.18.1"
+  cpp-options: -DVERSION="1.19"
   build-depends:
       Decimal >=0.5.1
-    , aeson
+    , aeson >=1
     , base >=4.9 && <4.15
     , blaze-html
     , blaze-markup
@@ -170,8 +170,8 @@
     , extra >=1.6.3
     , filepath
     , hjsmin
-    , hledger >=1.18.1 && <1.19
-    , hledger-lib >=1.18.1 && <1.19
+    , hledger >=1.19 && <1.20
+    , hledger-lib >=1.19 && <1.20
     , http-client
     , http-conduit
     , http-types
@@ -210,7 +210,7 @@
   hs-source-dirs:
       app
   ghc-options: -Wall -fwarn-tabs -Wcompat -Wincomplete-uni-patterns -Wincomplete-record-updates -Wredundant-constraints
-  cpp-options: -DVERSION="1.18.1"
+  cpp-options: -DVERSION="1.19"
   build-depends:
       base
     , hledger-web
diff --git a/hledger-web.info b/hledger-web.info
--- a/hledger-web.info
+++ b/hledger-web.info
@@ -3,8 +3,8 @@
 
 File: hledger-web.info,  Node: Top,  Next: OPTIONS,  Up: (dir)
 
-hledger-web(1) hledger-web 1.18.1
-*********************************
+hledger-web(1) hledger-web 1.18.99
+**********************************
 
 hledger-web - web interface for the hledger accounting tool
 
@@ -199,7 +199,14 @@
      generate future transactions from periodic transaction rules, for
      the next 6 months or till report end date.  In hledger-ui, also
      make ordinary future transactions visible.
+'--color=WHEN (or --colour=WHEN)'
 
+     Should color-supporting commands use ANSI color codes in text
+     output.  'auto' (default): whenever stdout seems to be a
+     color-supporting terminal.  'always' or 'yes': always, useful eg
+     when piping output into 'less -R'. 'never' or 'no': never.  A
+     NO_COLOR environment variable overrides this.
+
    When a reporting option appears more than once in the command line,
 the last one takes precedence.
 
@@ -573,22 +580,22 @@
 
 Tag Table:
 Node: Top72
-Node: OPTIONS1750
-Ref: #options1855
-Node: PERMISSIONS8383
-Ref: #permissions8522
-Node: EDITING UPLOADING DOWNLOADING9734
-Ref: #editing-uploading-downloading9915
-Node: RELOADING10749
-Ref: #reloading10883
-Node: JSON API11316
-Ref: #json-api11430
-Node: ENVIRONMENT16911
-Ref: #environment17027
-Node: FILES17760
-Ref: #files17860
-Node: BUGS18073
-Ref: #bugs18151
+Node: OPTIONS1752
+Ref: #options1857
+Node: PERMISSIONS8737
+Ref: #permissions8876
+Node: EDITING UPLOADING DOWNLOADING10088
+Ref: #editing-uploading-downloading10269
+Node: RELOADING11103
+Ref: #reloading11237
+Node: JSON API11670
+Ref: #json-api11784
+Node: ENVIRONMENT17265
+Ref: #environment17381
+Node: FILES18114
+Ref: #files18214
+Node: BUGS18427
+Ref: #bugs18505
 
 End Tag Table
 
diff --git a/hledger-web.txt b/hledger-web.txt
--- a/hledger-web.txt
+++ b/hledger-web.txt
@@ -179,6 +179,13 @@
               for  the  next 6 months or till report end date.  In hledger-ui,
               also make ordinary future transactions visible.
 
+       --color=WHEN (or --colour=WHEN)
+              Should color-supporting commands use ANSI color  codes  in  text
+              output.   'auto' (default): whenever stdout seems to be a color-
+              supporting terminal.  'always' or 'yes': always, useful eg  when
+              piping  output  into  'less  -R'.   'never'  or  'no': never.  A
+              NO_COLOR environment variable overrides this.
+
        When a reporting option appears more than once in the command line, the
        last one takes precedence.
 
@@ -538,4 +545,4 @@
 
 
 
-hledger-web 1.18.1                 June 2020                    hledger-web(1)
+hledger-web 1.18.99             September 2020                  hledger-web(1)
diff --git a/templates/default-layout.hamlet b/templates/default-layout.hamlet
--- a/templates/default-layout.hamlet
+++ b/templates/default-layout.hamlet
@@ -77,5 +77,4 @@
                 <li> <code>real:BOOL</code> - filter on postings' real/virtual-ness
                 <li> Enclose search patterns containing spaces in single or double quotes
                 <li> Prepend <code>not:</code> to negate a search term
-                <li> Multiple search terms on different fields are AND'ed, multiple search terms on the same field are OR'ed
-                <li> These search terms also work with command-line hledger
+                <li> Description, account, status query terms are OR'ed, others are AND'ed.
