[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [PATCH] ox-html: Ensure space between tag and attribute when closing
From: |
Lawrence Mitchell |
Subject: |
[O] [PATCH] ox-html: Ensure space between tag and attribute when closing tags |
Date: |
Tue, 07 May 2013 17:56:29 +0100 |
User-agent: |
Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) |
* 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" "<!doctype html>"))))
(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