Skip to content

Commit

Permalink
Merge pull request #396 from pfitaxel/markdown-preview
Browse files Browse the repository at this point in the history
fix(omd): Update override_url with htmlentities
  • Loading branch information
erikmd committed May 18, 2021
2 parents e1b3507 + 1e87190 commit 431113f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/repo/learnocaml_exercise.ml
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,13 @@ module File = struct
None
else
let title_url =
if title <> "" then Printf.sprintf {| title="%s"|} title else "" in
if title <> "" then Printf.sprintf {| title="%s"|}
(Omd_utils.htmlentities ~md:true title) else "" in
let html =
Printf.sprintf
{|<a href="%s" target="_blank" rel="noopener noreferrer"%s>%s</a>|}
href title_url (Omd_backend.html_of_md s) in
(Omd_utils.htmlentities ~md:true href) title_url
(Omd_backend.html_of_md s) in
Some html
else None
| _ -> None in
Expand Down

0 comments on commit 431113f

Please sign in to comment.