Skip to content
Snippets Groups Projects
Unverified Commit c604d1ef authored by David Beniamine's avatar David Beniamine
Browse files

Fix last encoding issues

parent d097195b
No related branches found
No related tags found
No related merge requests found
...@@ -197,6 +197,8 @@ sub do_backup($){ ...@@ -197,6 +197,8 @@ sub do_backup($){
sub do_sendmail($$){ sub do_sendmail($$){
my ($subject, $message) = @_; my ($subject, $message) = @_;
utf8::encode($subject);
utf8::encode($message);
my $msg = MIME::Lite->new( my $msg = MIME::Lite->new(
From => 'tetras-back', From => 'tetras-back',
To => 'root', To => 'root',
...@@ -206,7 +208,7 @@ sub do_sendmail($$){ ...@@ -206,7 +208,7 @@ sub do_sendmail($$){
$msg->attr("content-type.charset" => "UTF-8"); $msg->attr("content-type.charset" => "UTF-8");
$msg->attach( $msg->attach(
Type => 'text/plain; charset=UTF-8', Type => 'text/plain; charset=UTF-8',
Data => utf8::encode($message), Data => $message,
); );
# Add your text message. # Add your text message.
$msg->attach(Type => 'text/plain; charset=UTF-8', $msg->attach(Type => 'text/plain; charset=UTF-8',
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
//add save button + text field that triggers tetras-back \-\-save uuid=name //add save button + text field that triggers tetras-back \-\-save uuid=name
foreach ($conf['CONNECTED'] as $uuid => $dev) : foreach ($conf['CONNECTED'] as $uuid => $dev) :
?> ?>
<tr><td><?php echo utf8_encode($dev) ?></td><td><?php echo utf8_encode($uuid) ?></td> <tr><td><?php echo $dev ?></td><td><?php echo $uuid ?></td>
<td> <td>
<form action="actions.php" method="post"> <form action="actions.php" method="post">
<input type="hidden" name="uuid" value="<?php echo $uuid ?>"> <input type="hidden" name="uuid" value="<?php echo $uuid ?>">
...@@ -89,10 +89,10 @@ foreach ($conf['KNOWN'] as $uuid => $value) : ...@@ -89,10 +89,10 @@ foreach ($conf['KNOWN'] as $uuid => $value) :
} }
?> ?>
<tr> <tr>
<td><?php echo utf8_encode($name) ?></td> <td><?php echo $name ?></td>
<td><?php echo utf8_encode($uuid) ?></td> <td><?php echo $uuid ?></td>
<td><?php echo utf8_encode($last_seen) ?></td> <td><?php echo $last_seen ?></td>
<td><?php echo utf8_encode($last_backup_state) ?></td> <td><?php echo $last_backup_state ?></td>
<td> <td>
<form action="actions.php" method="post"> <form action="actions.php" method="post">
<input type="hidden" name="name" value="<?php echo $name ?>"> <input type="hidden" name="name" value="<?php echo $name ?>">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment