mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-20 03:36:20 +02:00
(basically the same as in r200, this time for users/vacation.php)
users/vacation.php - fix double-encoded special characters if language file contains entity-encoded strings by html_entity_decode'ing the string (will be encoded in template file later) users_vacation.tpl: - encode tSubject with htmlentities() in template git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@209 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
parent
3aa9032cd9
commit
5cf48d6cb5
@ -6,7 +6,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php print $PALANG['pUsersVacation_subject'] . ":"; ?></td>
|
<td><?php print $PALANG['pUsersVacation_subject'] . ":"; ?></td>
|
||||||
<td><input type="text" name="fSubject" value="<?php print $tSubject; ?>" /></td>
|
<td><input type="text" name="fSubject" value="<?php print htmlentities($tSubject, ENT_QUOTES, 'UTF-8'); ?>" /></td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -31,3 +31,4 @@
|
|||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
<?php /* vim: set ft=php expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?>
|
||||||
|
@ -42,7 +42,7 @@ if($CONF['vacation'] == 'NO') {
|
|||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
$tmp = preg_split ('/@/', $USERID_USERNAME);
|
$tmp = preg_split ('/@/', $USERID_USERNAME);
|
||||||
$USERID_DOMAIN = $tmp[1];
|
$USERID_DOMAIN = $tmp[1];
|
||||||
|
|
||||||
if ($_SERVER['REQUEST_METHOD'] == "GET")
|
if ($_SERVER['REQUEST_METHOD'] == "GET")
|
||||||
@ -56,10 +56,10 @@ if ($_SERVER['REQUEST_METHOD'] == "GET")
|
|||||||
$tBody = $row['body'];
|
$tBody = $row['body'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($tSubject == '') { $tSubject = $PALANG['pUsersVacation_subject_text']; }
|
if ($tSubject == '') { $tSubject = html_entity_decode($PALANG['pUsersVacation_subject_text'], ENT_QUOTES, 'UTF-8'); }
|
||||||
if ($tBody == '') { $tBody = $PALANG['pUsersVacation_body_text']; }
|
if ($tBody == '') { $tBody = html_entity_decode($PALANG['pUsersVacation_body_text'], ENT_QUOTES, 'UTF-8'); }
|
||||||
|
|
||||||
$template = "users_vacation.tpl";
|
$template = "users_vacation.tpl";
|
||||||
|
|
||||||
include ("../templates/header.tpl");
|
include ("../templates/header.tpl");
|
||||||
include ("../templates/users_menu.tpl");
|
include ("../templates/users_menu.tpl");
|
||||||
@ -85,8 +85,8 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
|
|||||||
if (isset ($_POST['fBack'])) $fBack = escape_string ($_POST['fBack']);
|
if (isset ($_POST['fBack'])) $fBack = escape_string ($_POST['fBack']);
|
||||||
|
|
||||||
//set a default, reset fields for coming back selection
|
//set a default, reset fields for coming back selection
|
||||||
if ($tSubject == '') { $tSubject = $PALANG['pUsersVacation_subject_text']; }
|
if ($tSubject == '') { $tSubject = html_entity_decode($PALANG['pUsersVacation_subject_text'], ENT_QUOTES, 'UTF-8'); }
|
||||||
if ($tBody == '') { $tBody = $PALANG['pUsersVacation_body_text']; }
|
if ($tBody == '') { $tBody = html_entity_decode($PALANG['pUsersVacation_body_text'], ENT_QUOTES, 'UTF-8'); }
|
||||||
|
|
||||||
// if they've set themselves away OR back, delete any record of vacation emails.
|
// if they've set themselves away OR back, delete any record of vacation emails.
|
||||||
if (!empty ($fBack) || !empty ($fAway))
|
if (!empty ($fBack) || !empty ($fAway))
|
||||||
@ -184,4 +184,6 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
|
|||||||
include ("../templates/users_vacation.tpl");
|
include ("../templates/users_vacation.tpl");
|
||||||
include ("../templates/footer.tpl");
|
include ("../templates/footer.tpl");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user