From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lawrence Mitchell Subject: [PATCH] ox-html: Ensure space between tag and attribute when closing tags Date: Tue, 07 May 2013 17:56:29 +0100 Message-ID: <874neeybia.fsf@gmx.li> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:52323) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZlBw-0005Yp-KK for emacs-orgmode@gnu.org; Tue, 07 May 2013 12:56:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZlBv-0007Nu-Ll for emacs-orgmode@gnu.org; Tue, 07 May 2013 12:56:40 -0400 Received: from plane.gmane.org ([80.91.229.3]:36225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZlBv-0007Nn-GM for emacs-orgmode@gnu.org; Tue, 07 May 2013 12:56:39 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UZlBu-0007eF-PV for emacs-orgmode@gnu.org; Tue, 07 May 2013 18:56:38 +0200 Received: from e4300lm.epcc.ed.ac.uk ([129.215.63.156]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 May 2013 18:56:38 +0200 Received: from wence by e4300lm.epcc.ed.ac.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 May 2013 18:56:38 +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: emacs-orgmode@gnu.org * lisp/ox-html.el (org-html-close-tag): Add space before attr. We might get an attribute to a tag with no space at its start. Rather than auditing all callers, unconditionally separate the tag from its attributes with a space when closing the tag. --- lisp/ox-html.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Robert Eckl wrote: > The space between "img" and the attribute "width" is missing. Attributes coming from the buffer didn't get a space prepended. Here's a fix. diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 05b99bf..0379567 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -1301,7 +1301,7 @@ CSS classes, then this prefix can be very useful." (member dt '("html5" "xhtml5" "")))) (defun org-html-close-tag (tag attr info) - (concat "<" tag (or attr "") + (concat "<" tag " " attr (if (org-html-xhtml-p info) " />" ">"))) (defun org-html--make-attribute-string (attributes) -- 1.8.2-rc3