From 08478e65cd2d7f31311a448d9d89637432a5d423 Mon Sep 17 00:00:00 2001 From: Andreas Gohr <andi@splitbrain.org> Date: Sun, 4 Sep 2005 13:29:30 +0200 Subject: [PATCH] fixed newlines in JavaScript alerts darcs-hash:20050904112930-7ad00-fb2b246c6b4872ae97cd859d452a1c0f0ca77613.gz --- inc/lang/en/lang.php | 3 ++- inc/template.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php index 1298733d8..b7fe08225 100644 --- a/inc/lang/en/lang.php +++ b/inc/lang/en/lang.php @@ -63,7 +63,8 @@ $lang['lockedby'] = 'Currently locked by'; $lang['lockexpire'] = 'Lock expires at'; $lang['willexpire'] = 'Your lock for editing this page is about to expire in a minute.\nTo avoid conflicts use the preview button to reset the locktimer.'; -$lang['notsavedyet'] = 'There are unsaved changes, that will be lost.\nReally continue?'; +$lang['notsavedyet'] = 'Unsaved changes will be lost.\nReally continue?'; + $lang['rssfailed'] = 'An error occured while fetching this feed: '; $lang['nothingfound']= 'Nothing was found.'; diff --git a/inc/template.php b/inc/template.php index a48202e96..20d42a7a4 100644 --- a/inc/template.php +++ b/inc/template.php @@ -204,8 +204,8 @@ function tpl_metaheaders(){ // include some JavaScript language strings ptln('<script language="javascript" type="text/javascript" charset="utf-8">',$it); - ptln(" var alertText = '".addslashes($lang['qb_alert'])."'",$it); - ptln(" var notSavedYet = '".addslashes($lang['notsavedyet'])."'",$it); + ptln(" var alertText = '".str_replace('\\\\n','\\n',addslashes($lang['qb_alert']))."'",$it); + ptln(" var notSavedYet = '".str_replace('\\\\n','\\n',addslashes($lang['notsavedyet']))."'",$it); ptln(" var DOKU_BASE = '".DOKU_BASE."'",$it); ptln('</script>',$it); -- GitLab