Aankhen <aank...@gmail.com> writes: > On Tue, Mar 8, 2011 at 02:07, Bernt Hansen <be...@norang.ca> wrote: >> Thanks for the patch. I still see validation errors after applying this >> patch. I've posted the original test file at >> http://www.norang.ca/tmp/foo.html and you can click on the validation >> link at the bottom to see the remaining errors. > > This one seemed easy to fix, so I thought I’d butt in. :-) Hope the > format of the patch is right (I’m using hg-git).
Thanks. Modulo line breakage this patch applies and Jambunathan's test file now validates XHTML 1.0 Here's the 2 patch that solve this:
>From cd423f908de55a2379c4476c0da8922968786e64 Mon Sep 17 00:00:00 2001 From: Manuel Giraud <manuel.gir...@univ-nantes.fr> Date: Mon, 7 Mar 2011 17:12:46 +0100 Subject: [PATCH 1/2] org-html.el: bug that prevents some target to be rendered correctly. --- lisp/org-exp.el | 2 +- lisp/org-html.el | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/org-exp.el b/lisp/org-exp.el index ae7bdcf..f22eeba 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -2062,7 +2062,7 @@ can work correctly." (let* ((rtn (mapconcat 'identity - (org-split-string s "[^a-zA-Z0-9_\\.-]+") "--")) + (org-split-string s "[^a-zA-Z0-9_\\.-]+") "-")) (a (assoc rtn alist))) (or (cdr a) rtn)))) diff --git a/lisp/org-html.el b/lisp/org-html.el index eb4b199..8fe8029 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -2181,12 +2181,12 @@ that uses these same face definitions." (defun org-html-protect (s) "Convert characters to HTML equivalent. Possible conversions are set in `org-export-html-protect-char-alist'." - (let ((start 0) - (cl org-export-html-protect-char-alist) c) + (let ((cl org-export-html-protect-char-alist) c) (while (setq c (pop cl)) - (while (string-match (car c) s start) - (setq s (replace-match (cdr c) t t s) - start (1+ (match-beginning 0))))) + (let ((start 0)) + (while (string-match (car c) s start) + (setq s (replace-match (cdr c) t t s) + start (match-beginning 0))))) s)) (defun org-html-expand (string) -- 1.7.1
>From 3842d9aa15271658b06ad818761d530c871492e0 Mon Sep 17 00:00:00 2001 From: Aankhen <aank...@gmail.com> Date: Tue, 8 Mar 2011 11:06:44 +0100 Subject: [PATCH 2/2] Fix anchors in HTML export. --- lisp/org-html.el | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org-html.el b/lisp/org-html.el index 8fe8029..9b44e8a 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -1996,8 +1996,8 @@ for formatting. This is required for the DocBook exporter." ;; DocBook document, we want to always include the caption to make ;; DocBook XML file valid. (push (format "<caption>%s</caption>" (or caption "")) html) - (when label (push (format "<a name=\"%s\" id=\"%s\"></a>" (org-solidify-link-text label) (org-solidify-link-text label)) - html)) + (when label + (setq html-table-tag (org-export-splice-attributes html-table-tag (format "id=\"%s\"" (org-solidify-link-text label))))) (push html-table-tag html)) (setq html (mapcar (lambda (x) -- 1.7.1
-- Manuel Giraud