Skip to content

Commit

Permalink
fix: update overrideURL to handle escape characters problems in URL
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisAyroles committed May 18, 2021
1 parent 2b071d1 commit 1e87190
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/repo/learnocaml_exercise.ml
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 1e87190

Please sign in to comment.