Fix welcome page visit

parent ccaca407
;; -*- indent-tabs-mode:nil; coding: utf-8 -*-
;; Copyright (C) 2017,2019
;; Copyright (C) 2017,2019,2020
;; "Mu Lei" known as "NalaGinrut" <NalaGinrut@gmail.com>
;; Colt is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License
......
;; -*- indent-tabs-mode:nil; coding: utf-8 -*-
;; Copyright (C) 2017,2018,2019
;; Copyright (C) 2017,2018,2019,2020
;; "Mu Lei" known as "NalaGinrut" <NalaGinrut@gmail.com>
;; Colt is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License
......@@ -364,9 +364,17 @@
(one-line-result "echo -n \"\" | git mktree -z")
"First commit" #:parent #f)))
;; NOTE: The browser doesn't encode punctuations
(define (mimic-client-encode str)
(uri-encode str #:unescaped-chars (char-set-union
char-set:letter
char-set:punctuation)))
(define (post-welcome-page)
(let ((timestamp (current-time)))
(git-post-article (uri-encode "Welcome to Colt Blog Engine!")
;; NOTE: We encode twice in client JS to escape "/", so just mimic it
(git-post-article (mimic-client-encode
(mimic-client-encode "welcome to colt blog engine!"))
"Colt blog engine is written with GNU Artanis, and licenced under GPLv3.
This project is created in hope of helping people with free software.
Happy hacking!"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment