1
0
Fork 0

better error messages for invalid xhtml

* tekuti/filters.scm (bad-user-submitted-xhtml?): Add a more informative
  error message.
This commit is contained in:
Andy Wingo 2008-04-11 13:24:57 +02:00
parent e1e44eb8f0
commit 2f7780b552

View file

@ -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 &lt;, &gt;, or &amp;, 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)