diff options
author | JSDurand <mmemmew@gmail.com> | 2022-08-30 01:16:14 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2022-08-30 01:16:14 +0800 |
commit | e08204d423766c29f72e0e224f061ab30fc0340d (patch) | |
tree | 87b7632b7a7ed40d7edd3428cc5096bb0d75a7df /org-conf.el | |
parent | 1b8e0b62d4ba6a9aa505fc52f520608c7682fd46 (diff) |
org: my blogs are now XHTML 1.0 Strict!
* org-conf.el (durand-org-post-process,
durand-org-publish-html-advice): After replacing each "<style>" with
"<style type=\"text/css\">" I can finally say that my blogs all
conform to XHTML 1.0 Strict now, as can be seen by following the
"validate" buttons on the blogs.
Quite happy. :D
Diffstat (limited to 'org-conf.el')
-rw-r--r-- | org-conf.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/org-conf.el b/org-conf.el index c7e4d42..a66a4a0 100644 --- a/org-conf.el +++ b/org-conf.el @@ -863,6 +863,10 @@ The feeds are generated by the function `durand-org-generate-atom-feed'." (with-temp-buffer (insert-file-contents index-file) (goto-char (point-min)) + (cond + ((search-forward "<style>" nil t) + (replace-match "<style type=\"text/css\">"))) + (goto-char (point-min)) (search-forward "Latest updates") (goto-char (line-end-position)) (while (search-forward "<table" nil t) @@ -898,6 +902,10 @@ The feeds are generated by the function `durand-org-generate-atom-feed'." (with-temp-buffer (insert-file-contents publish-sitemap-file) (goto-char (point-min)) + (cond + ((search-forward "<style>" nil t) + (replace-match "<style type=\"text/css\">"))) + (goto-char (point-min)) (search-forward "</colgroup>" nil t) (let ((regexp (rx-to-string '(seq @@ -1040,6 +1048,10 @@ title." (insert-file-contents html-file-name) (goto-char (point-min)) (cond + ((search-forward "<style>" nil t) + (replace-match "<style type=\"text/css\">"))) + (goto-char (point-min)) + (cond ((search-forward "h1 class=\"title\"" nil t) ;; if it does not have a title, we do not add a time info. (search-forward "</h1>" nil) |