emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Properly export title tag in org-html
@ 2011-02-15 21:38 Pierre Téchoueyres
  2011-02-16 10:54 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Pierre Téchoueyres @ 2011-02-15 21:38 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 406 bytes --]

	Hi List,

	I think I've found a little bug in org-export-as-html function in org-
html.el file.
	If you're setting an title with some escape character then the title tag 
in html header is set "as is".

for example if your title is foo\_bar then the title tag will be 
<title>foo\_bar</title> instead of <title>foo_bar</title>

	I tried to do the job in the attached patch.
	Hope this could help.

Pierre

[-- Attachment #1.2: Type: text/html, Size: 2577 bytes --]

[-- Attachment #2: org-html.el.diff --]
[-- Type: text/x-patch, Size: 358 bytes --]

diff --git a/lisp/org-html.el b/lisp/org-html.el
index 9135c73..016a181 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -1257,7 +1257,7 @@ lang=\"%s\" xml:lang=\"%s\">
 		      "")
 		  (or charset "iso-8859-1"))
 		 language language
-		 title
+		 (org-html-expand title)
 		 (or charset "iso-8859-1")
 		 date author description keywords
 		 style

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Properly export title tag in org-html
  2011-02-15 21:38 [PATCH] Properly export title tag in org-html Pierre Téchoueyres
@ 2011-02-16 10:54 ` Bastien
  0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2011-02-16 10:54 UTC (permalink / raw)
  To: Pierre Téchoueyres; +Cc: emacs-orgmode

Hi Pierre,

Pierre Téchoueyres <Pierre.Techoueyres@free.fr> writes:

> I think I've found a little bug in org-export-as-html function in
> org-html.el file.
>
> If you're setting an title with some escape character then the title
> tag in html header is set "as is".
>
> for example if your title is foo\_bar then the title tag will be
> <title>foo\_bar</title> instead of <title>foo_bar</title>

Thanks for reporting this!

> I tried to do the job in the attached patch.

I applied a slightly modified version of your patch, html-expanding 
the title earlier in the function.

Thanks for submitting it,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-16 16:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-15 21:38 [PATCH] Properly export title tag in org-html Pierre Téchoueyres
2011-02-16 10:54 ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).