Atom escape category string

This commit is contained in:
orbifx 2021-07-22 23:42:16 +01:00
parent 00699cefc4
commit 4bbeec53e6

View File

@ -30,7 +30,7 @@ let htm_entry base_url text =
"<entry><link rel=\"alternate\" href=\"" ^ base_url ^ "/" ^ u ^ ".htm\" />" "<entry><link rel=\"alternate\" href=\"" ^ base_url ^ "/" ^ u ^ ".htm\" />"
^ title text ^ id text ^ updated text ^ authors text ^ title text ^ id text ^ updated text ^ authors text
^ (opt_element "summary" @@ esc @@ Text.str "abstract" text) ^ (opt_element "summary" @@ esc @@ Text.str "abstract" text)
^ String_set.fold (fun elt a -> a ^ "<category term=\"" ^ elt ^ "\"/>") (Text.set "topics" text) "" ^ String_set.fold (fun elt a -> a ^ "<category term=\"" ^ esc elt ^ "\"/>") (Text.set "topics" text) ""
^ "<content type=\"xhtml\"><div xmlns=\"http://www.w3.org/1999/xhtml\">" ^ "<content type=\"xhtml\"><div xmlns=\"http://www.w3.org/1999/xhtml\">"
^ P.of_string text.body "" ^ P.of_string text.body ""
^ "</div></content></entry>\n" ^ "</div></content></entry>\n"