mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
* fix incorrect title in browser history in some cases
This commit is contained in:
parent
7d5386d68e
commit
815c663319
4 changed files with 13 additions and 9 deletions
|
|
@ -28,7 +28,7 @@
|
|||
<script type="text/javascript">
|
||||
$().ready(function(){
|
||||
mytinytodo.init({
|
||||
title: "<?php mttinfo('title', false); ?>",
|
||||
title: <?php echo json_encode(get_unsafe_mttinfo('title'), JSON_UNESCAPED_UNICODE); ?> ,
|
||||
lang: <?php echo Lang::instance()->makeJS() ?>,
|
||||
mttUrl: "<?php mttinfo('mtt_url'); ?>",
|
||||
homeUrl: "<?php mttinfo('url'); ?>",
|
||||
|
|
|
|||
|
|
@ -228,6 +228,11 @@ function escapeTags($s)
|
|||
return $s;
|
||||
}
|
||||
|
||||
function removeNewLines($s)
|
||||
{
|
||||
return str_replace( ["\r","\n"], '', $s );
|
||||
}
|
||||
|
||||
/* found in comments on http://www.php.net/manual/en/function.uniqid.php#94959 */
|
||||
function generateUUID()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -141,10 +141,9 @@ function __($s)
|
|||
return Lang::instance()->get($s);
|
||||
}
|
||||
|
||||
function mttinfo($v, $escape = true)
|
||||
function mttinfo($v)
|
||||
{
|
||||
global $_mttinfo;
|
||||
echo $escape ? get_mttinfo($v) : get_unsafe_mttinfo($v);
|
||||
echo get_mttinfo($v);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -41,13 +41,13 @@ if(isset($_POST['save']))
|
|||
catch (Exception $e) {
|
||||
}
|
||||
Config::set('autotag', (int)_post('autotag'));
|
||||
Config::set('session', _post('session'));
|
||||
Config::set('session', trim(_post('session')) );
|
||||
Config::set('firstdayofweek', (int)_post('firstdayofweek'));
|
||||
Config::set('clock', (int)_post('clock'));
|
||||
Config::set('dateformat', _post('dateformat'));
|
||||
Config::set('dateformat2', _post('dateformat2'));
|
||||
Config::set('dateformatshort', _post('dateformatshort'));
|
||||
Config::set('title', trim(_post('title')));
|
||||
Config::set('dateformat', removeNewLines(_post('dateformat')) );
|
||||
Config::set('dateformat2', removeNewLines(_post('dateformat2')) );
|
||||
Config::set('dateformatshort', removeNewLines(_post('dateformatshort')) );
|
||||
Config::set('title', removeNewLines(trim(_post('title'))) );
|
||||
Config::set('showdate', (int)_post('showdate'));
|
||||
Config::save();
|
||||
$t['saved'] = 1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue