1
0
Fork 0

inform the user of malformed xhtml internal error when publishing

This commit is contained in:
Aleix Conchillo Flaque 2010-12-23 17:41:09 +01:00 committed by Andy Wingo
parent 0dee43b2a0
commit 612577eca9
2 changed files with 7 additions and 6 deletions

View file

@ -146,18 +146,19 @@
(pre-post-order (wordpress->sxml x) *valid-xhtml-rules*)
#f)
(lambda (key . args)
`(div (p "Invalid XHTML")
`(div (p (b "Invalid XHTML"))
,(case key
((parser-error)
`(div
(p "The comment filter requires valid XHTML, although "
"it will translate single newlines to <br/> elements, "
(p "Valid XHTML is required, 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 "
"malformed XHTML tag.")
(p "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:")
(p (b "Here is the internal error:"))
(pre ,(with-output-to-string
(lambda () (write args))))))
((bad-tag)

View file

@ -113,7 +113,7 @@
((wordpress) (wordpress->sxml raw))
(else `(pre ,raw))))
(lambda args
`(pre "Formatting error\n" ,raw)))))
`(pre ,(bad-user-submitted-xhtml? raw))))))
(define (post-readable-date post)
(let ((date (time-utc->date