From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Org-special-blogs does not make well-formed xhtml Date: Mon, 03 Oct 2011 14:44:40 +0200 Message-ID: <4E89AE38.3020309@christianmoe.com> Reply-To: mail@christianmoe.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:42562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAhrF-0005Nl-R9 for emacs-orgmode@gnu.org; Mon, 03 Oct 2011 08:42:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RAhrE-0008HW-UM for emacs-orgmode@gnu.org; Mon, 03 Oct 2011 08:42:57 -0400 Received: from mars.hitrost.net ([91.185.211.18]:34698) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAhrE-0007yG-Ox for emacs-orgmode@gnu.org; Mon, 03 Oct 2011 08:42:56 -0400 Received: from lk.92.63.17.213.dc.cable.static.lj-kabel.net ([92.63.17.213] helo=Celebrian-2.local) by mars.hitrost.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1RAhqb-0002ht-QC for emacs-orgmode@gnu.org; Mon, 03 Oct 2011 14:42:17 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode Hi, XHTML produced with Org-special-blocks is not well-formed;
tags get wrapped in

tags. Example: Some text. #+begin_sidebar Some details left out of the main text. Some more details. #+end_sidebar Some more text. This results in the following html, which causes XML processors to fail.

Some more text.

The problem seems to be fixed by un-commenting the fifth line in the below function in org-special-blocks.el: (defun org-special-blocks-convert-html-special-cookies () "Converts the special cookies into div blocks." ;; Uses the dynamically-bound variable `line'. (when (string-match "^ORG-\\(.*\\)-\\(START\\|END\\)$" line) ; (org-close-par-maybe) (message "%s" (match-string 1)) (if (equal (match-string 2 line) "START") (insert "
\n") (insert "
\n")) (throw 'nextline nil))) Does anyone know if that was commented out for a reason? Yours, Christian