From a5e7ab75ed9ff253df73cf951140748ce41503c4 Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Sun, 19 Sep 2021 12:04:15 +0200 Subject: pages: escape parameters in pages, update copyright Signed-off-by: Alban Gruin --- src/pages.ml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/pages.ml b/src/pages.ml index a031599..2cb0aa4 100644 --- a/src/pages.ml +++ b/src/pages.ml @@ -1,5 +1,5 @@ (* - * Copyright (C) 2020 Alban Gruin + * Copyright (C) 2020, 2021 Alban Gruin * * ucs is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published @@ -15,6 +15,9 @@ * along with ucs. If not, see . *) +let escape str = + Stringext.replace_all_assoc str ["<", "<"; ">", ">"] + let common content = {| @@ -31,7 +34,7 @@ let common content =
|} ^ content ^ {|
-

(c) 2020 – Alban Gruin – µCS |} ^ Version.version () ^ {| « CANIS MINOR »

+

(c) 2021 – Alban Gruin – µCS |} ^ escape (Version.version ()) ^ {| « CANIS MINOR »

@@ -88,7 +91,9 @@ d’Apple), et ainsi attirer plus d’utilisateurs ? --> |} -let link lnk = common @@ {| +let link lnk = + let lnk = escape lnk in + common @@ {|

Lien de l'emploi du temps

|} ^ lnk ^ {| -- cgit v1.2.1