From 1e87190a9de73136dca0b7032267e0f8c2c066e5 Mon Sep 17 00:00:00 2001 From: LouisAyroles Date: Tue, 18 May 2021 10:50:01 +0200 Subject: [PATCH] fix: update overrideURL to handle escape characters problems in URL --- src/repo/learnocaml_exercise.ml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/repo/learnocaml_exercise.ml b/src/repo/learnocaml_exercise.ml index f919d3a3a..ffb7215e2 100644 --- a/src/repo/learnocaml_exercise.ml +++ b/src/repo/learnocaml_exercise.ml @@ -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 {|%s|} - 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