inform the user of malformed xhtml internal error when publishing
This commit is contained in:
parent
0dee43b2a0
commit
612577eca9
2 changed files with 7 additions and 6 deletions
|
@ -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 <, >, or &, respectively.")
|
||||
(p "Here is the internal error:")
|
||||
(p (b "Here is the internal error:"))
|
||||
(pre ,(with-output-to-string
|
||||
(lambda () (write args))))))
|
||||
((bad-tag)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue