1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2025-01-05 11:45:52 +00:00

Mark style definitions as unparsed CDATA.

Org-mode does sometimes included CSS definitions directly
into an exported XHTML file.  To pass validation tests
for XHTML, these sections need to be wrapped in
order to pass as CDATA, not PCDATA.  This patch
(written by Sebastian Rose) does implement this change.
It also fixes some typos.
This commit is contained in:
Carsten Dominik 2008-11-02 17:01:50 +01:00
parent d1f91f7e93
commit bdc93a9cd2
3 changed files with 10 additions and 3 deletions

View File

@ -8230,7 +8230,7 @@ directory on the local machine.
:publishing-directory "~/public_html"
:section-numbers nil
:table-of-contents nil
:style "<link rel="stylesheet"
:style "<link rel=\"stylesheet\"
href=\"../other/mystyle.css\"
type=\"text/css\">")))
@end lisp
@ -8267,7 +8267,7 @@ right place on the web server, and publishing images to it.
:headline-levels 3
:section-numbers nil
:table-of-contents nil
:style "<link rel="stylesheet"
:style "<link rel=\"stylesheet\"
href=\"../other/mystyle.css\" type=\"text/css\">"
:auto-preamble t
:auto-postamble nil)

View File

@ -1,5 +1,9 @@
2008-11-02 Carsten Dominik <dominik@science.uva.nl>
* org-exp.el (org-export-html-style)
(org-export-html-style-default): Mark style definitions as
unparsed CDATA.
* org-publish.el (org-publish-validate-link): Function
re-introduced.

View File

@ -492,6 +492,7 @@ Org-mode file."
(defconst org-export-html-style-default
"<style type=\"text/css\">
<![CDATA[
html { font-family: Times, serif; font-size: 12pt; }
.title { text-align: center; }
.todo { color: red; }
@ -518,7 +519,7 @@ Org-mode file."
white-space:nowrap; }
.org-info-js_search-highlight {background-color:#ffff00; color:#000000;
font-weight:bold; }
]]>
</style>"
"The default style specification for exported HTML files.
Please use the variables `org-export-html-style' and
@ -547,11 +548,13 @@ you should consider to include definitions for the following classes:
For example, a valid value would be:
<style type=\"text/css\">
<![CDATA[
p { font-weight: normal; color: gray; }
h1 { color: black; }
.title { text-align: center; }
.todo, .timestamp-kwd { color: red; }
.done { color: green; }
]]>
</style>
If you'd like to refer to en external style file, use something like