浏览代码

Protect image elements

* org-html.el (org-export-html-format-image): Protect image elements.

Follow up of 6a369c26d3f936bc71cba9d7148dcecf1b2c9677.
David Maus 14 年之前
父节点
当前提交
1052f07ecf
共有 1 个文件被更改,包括 8 次插入8 次删除
  1. 8 8
      lisp/org-html.el

+ 8 - 8
lisp/org-html.el

@@ -1801,7 +1801,7 @@ lang=\"%s\" xml:lang=\"%s\">
   "Create image tag with source and attributes."
   (save-match-data
     (if (string-match "^ltxpng/" src)
-	(format "<img src=\"%s\" alt=\"%s\"/>"
+	(format "@<img src=\"%s\" alt=\"%s\"/>"
                 src (org-find-text-property-in-string 'org-latex-src src))
       (let* ((caption (org-find-text-property-in-string 'org-caption src))
 	     (attr (org-find-text-property-in-string 'org-attributes src))
@@ -1809,20 +1809,20 @@ lang=\"%s\" xml:lang=\"%s\">
 	(setq caption (and caption (org-html-do-expand caption)))
 	(concat
 	(if caption
-	    (format "%s<div %sclass=\"figure\">
+	    (format "%s@<div %sclass=\"figure\">
 <p>"
-		    (if org-par-open "</p>\n" "")
+		    (if org-par-open "@</p>\n" "")
 		    (if label (format "id=\"%s\" " (org-solidify-link-text label)) "")))
-	(format "<img src=\"%s\"%s />"
+	(format "@<img src=\"%s\"%s />"
 		src
 		(if (string-match "\\<alt=" (or attr ""))
 		    (concat " " attr )
 		  (concat " " attr " alt=\"" src "\"")))
 	(if caption
-	    (format "</p>%s
-</div>%s"
-		(concat "\n<p>" caption "</p>")
-		(if org-par-open "\n<p>" ""))))))))
+	    (format "@</p>%s
+@</div>%s"
+		(concat "\n@<p>" caption "@</p>")
+		(if org-par-open "\n@<p>" ""))))))))
 
 (defun org-export-html-get-bibliography ()
   "Find bibliography, cut it out and return it."