diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/pages.ml | 11 | 
1 files 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 <http://www.gnu.org/licenses/>.   *) +let escape str = +  Stringext.replace_all_assoc str ["<", "<"; ">", ">"] +  let common content =  {|<!DOCTYPE html>  <html lang="fr"> @@ -31,7 +34,7 @@ let common content =      <article>|} ^ content ^  {|    </article>      <footer> -      <p>(c) 2020 – Alban Gruin – µCS |} ^ Version.version () ^ {| « CANIS MINOR »</p> +      <p>(c) 2021 – Alban Gruin – µCS |} ^ escape (Version.version ()) ^ {| « CANIS MINOR »</p>      </footer>    </body>  </html> @@ -88,7 +91,9 @@ d’Apple), et ainsi attirer plus d’utilisateurs ? -->        </section>  |} -let link lnk = common @@ {| +let link lnk = +  let lnk = escape lnk in +  common @@ {|        <section>          <h3>Lien de l'emploi du temps</h3>          <a href="|} ^ lnk ^ {|">|} ^ lnk ^ {|</a> | 
