summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGravatar Aleix Conchillo Flaque2010-12-23 17:41:09 +0100
committerGravatar Andy Wingo2011-02-18 23:27:45 +0100
commit612577eca92b8a18f1085f4614947817e27658f0 (patch)
tree1a2ca027a35e401694440f7eee22a3132fe295ea
parent0dee43b2a0dbcfb7e06d47e60821908744161178 (diff)
downloadtekuti-612577eca92b8a18f1085f4614947817e27658f0.tar.gz
tekuti-612577eca92b8a18f1085f4614947817e27658f0.zip
inform the user of malformed xhtml internal error when publishing
-rw-r--r--tekuti/filters.scm11
-rw-r--r--tekuti/post.scm2
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 <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)
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