emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Valid XHTML


From: Sebastian Rose
Subject: Re: [Orgmode] Valid XHTML
Date: Mon, 27 Oct 2008 01:55:03 +0100
User-agent: Mozilla-Thunderbird 2.0.0.16 (X11/20080724)

Hi,



1.) ERR

   SSTOOOP!!!

  Sebastian Rose wrote:
<a href="x.php%3Fa%3Db%26c%3Dd">x.php?a=b&amp;c=d</a>
                  ^                        ^
urlencoded--------'              entities--'


  Sorry, that's bullsh... This is one of the errors, that goes away, if


  <a href="x.php?a=b&c=d">x.php?a=b&amp;c=d</a>
                                   ^
                         entities--'



2.) Fix for 'no <pre> in <p> (XHTML)':

  The appended patch fixes this. Don't know if it is correct, but I
  tested repeatedly with various files and it seems OK. No empty <p>
  elements remain.




Regards,

   Sebastian
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 4153554..8762843 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -3102,6 +3102,7 @@ lang=\"%s\" xml:lang=\"%s\">
                     (string-match "^[ \t]*:\\(.*\\)" line))
            (when (not infixed)
              (setq infixed t)
+          (org-close-par-maybe)
              (insert "<pre class=\"example\">\n"))
            (insert (org-html-protect (match-string 1 line)) "\n")
            (when (or (not lines)
@@ -3339,6 +3340,7 @@ lang=\"%s\" xml:lang=\"%s\">
                                  head-count)
            ;; QUOTES
            (when (string-match quote-re line)
+          (org-close-par-maybe)
              (insert "<pre>")
              (setq inquote t)))

@@ -3449,7 +3451,7 @@ lang=\"%s\" xml:lang=\"%s\">
            (insert line "\n")))))

       ;; Properly close all local lists and other lists
-      (when inquote (insert "</pre>\n"))
+      (when inquote (insert "</pre>\n") (org-open-par))
       (when in-local-list
        ;; Close any local lists before inserting a new header line
        (while local-list-type

reply via email to

[Prev in Thread] Current Thread [Next in Thread]