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*)
|
(pre-post-order (wordpress->sxml x) *valid-xhtml-rules*)
|
||||||
#f)
|
#f)
|
||||||
(lambda (key . args)
|
(lambda (key . args)
|
||||||
`(div (p "Invalid XHTML")
|
`(div (p (b "Invalid XHTML"))
|
||||||
,(case key
|
,(case key
|
||||||
((parser-error)
|
((parser-error)
|
||||||
`(div
|
`(div
|
||||||
(p "The comment filter requires valid XHTML, although "
|
(p "Valid XHTML is required, although it will "
|
||||||
"it will translate single newlines to <br/> elements, "
|
"translate single newlines to <br/> elements, "
|
||||||
"and multiple newlines to paragraphs.")
|
"and multiple newlines to paragraphs.")
|
||||||
(p "Usually if you get here it's because you put in a "
|
(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 "
|
"you have an unescaped <, >, or & character. Replace "
|
||||||
"them with <, >, or &, respectively.")
|
"them with <, >, or &, respectively.")
|
||||||
(p "Here is the internal error:")
|
(p (b "Here is the internal error:"))
|
||||||
(pre ,(with-output-to-string
|
(pre ,(with-output-to-string
|
||||||
(lambda () (write args))))))
|
(lambda () (write args))))))
|
||||||
((bad-tag)
|
((bad-tag)
|
||||||
|
|
|
@ -113,7 +113,7 @@
|
||||||
((wordpress) (wordpress->sxml raw))
|
((wordpress) (wordpress->sxml raw))
|
||||||
(else `(pre ,raw))))
|
(else `(pre ,raw))))
|
||||||
(lambda args
|
(lambda args
|
||||||
`(pre "Formatting error\n" ,raw)))))
|
`(pre ,(bad-user-submitted-xhtml? raw))))))
|
||||||
|
|
||||||
(define (post-readable-date post)
|
(define (post-readable-date post)
|
||||||
(let ((date (time-utc->date
|
(let ((date (time-utc->date
|
||||||
|
|
Loading…
Reference in a new issue