diff --git a/src/content/themes/default/index.php b/src/content/themes/default/index.php index 032d9f3..976c7cc 100644 --- a/src/content/themes/default/index.php +++ b/src/content/themes/default/index.php @@ -29,7 +29,7 @@ $().ready(function(){ mytinytodo.init({ token: "" , - title: , + title: , lang: makeJS() ?>, mttUrl: "", homeUrl: "", diff --git a/src/init.php b/src/init.php index a346615..83b5fdb 100644 --- a/src/init.php +++ b/src/init.php @@ -250,6 +250,15 @@ function reset_mttinfo($key) unset( $_mttinfo[$key] ); } +function mtt_quoted_title() +{ + $s = json_encode(get_unsafe_mttinfo('title'), JSON_UNESCAPED_UNICODE); + if ($s === false) { + return '""'; + } + return $s; +} + function getRequestUri() { // Do not use HTTP_X_REWRITE_URL due to CVE-2018-14773