better error messages for invalid xhtml
* tekuti/filters.scm (bad-user-submitted-xhtml?): Add a more informative error message.
This commit is contained in:
parent
e1e44eb8f0
commit
2f7780b552
1 changed files with 11 additions and 2 deletions
|
@ -149,8 +149,17 @@
|
||||||
`(div (p "Invalid XHTML")
|
`(div (p "Invalid XHTML")
|
||||||
,(case key
|
,(case key
|
||||||
((parser-error)
|
((parser-error)
|
||||||
`(pre ,(with-output-to-string
|
`(div
|
||||||
(lambda () (write args)))))
|
(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)
|
((bad-tag)
|
||||||
`(p "XHTML tag disallowed: " ,(symbol->string (car args))))
|
`(p "XHTML tag disallowed: " ,(symbol->string (car args))))
|
||||||
((bad-attr)
|
((bad-attr)
|
||||||
|
|
Loading…
Reference in a new issue