From 612577eca92b8a18f1085f4614947817e27658f0 Mon Sep 17 00:00:00 2001 From: Aleix Conchillo Flaque Date: Thu, 23 Dec 2010 17:41:09 +0100 Subject: inform the user of malformed xhtml internal error when publishing --- tekuti/filters.scm | 11 ++++++----- tekuti/post.scm | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/tekuti/filters.scm b/tekuti/filters.scm index dbc2684..78a5d18 100644 --- a/tekuti/filters.scm +++ b/tekuti/filters.scm @@ -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
elements, " + (p "Valid XHTML is required, although it will " + "translate single newlines to
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) diff --git a/tekuti/post.scm b/tekuti/post.scm index 75218ed..6bc61ea 100644 --- a/tekuti/post.scm +++ b/tekuti/post.scm @@ -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 -- cgit v1.2.3-54-g00ecf