diff options
author | Andy Wingo | 2008-04-11 13:24:57 +0200 |
---|---|---|
committer | Andy Wingo | 2008-04-11 13:24:57 +0200 |
commit | 2f7780b552e11fb1645c628e1fd17158672b3ad8 (patch) | |
tree | 9c0c7863cc3edeffdbcff5e16eaa7d33d8413142 | |
parent | e1e44eb8f007244dd408fa57c0e696360b5334b1 (diff) | |
download | tekuti-2f7780b552e11fb1645c628e1fd17158672b3ad8.tar.gz tekuti-2f7780b552e11fb1645c628e1fd17158672b3ad8.zip |
better error messages for invalid xhtml
* tekuti/filters.scm (bad-user-submitted-xhtml?): Add a more informative
error message.
-rw-r--r-- | tekuti/filters.scm | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tekuti/filters.scm b/tekuti/filters.scm index d7b914b..eaa37dd 100644 --- a/tekuti/filters.scm +++ b/tekuti/filters.scm @@ -149,8 +149,17 @@ `(div (p "Invalid XHTML") ,(case key ((parser-error) - `(pre ,(with-output-to-string - (lambda () (write args))))) + `(div + (p "The comment filter requires valid XHTML, although " + "it will translate single newlines to <br/> elements, " + "and multiple newlines to paragraphs.") + (p "Usually if you get here it's because you put in a " + "malformed XHTML tag. Another way to get here is if " + "you have an unescaped <, >, or & character. Replace " + "them with <, >, or &, respectively.") + (p "Here is the internal error:") + (pre ,(with-output-to-string + (lambda () (write args)))))) ((bad-tag) `(p "XHTML tag disallowed: " ,(symbol->string (car args)))) ((bad-attr) |