From deb20127350e81a01fe8ac8e3abdd7a5fbefddf3 Mon Sep 17 00:00:00 2001 From: loredo Date: Mon, 23 Jan 2017 14:51:52 +0000 Subject: [PATCH] 75_MSG: only replace newline for e-mails git-svn-id: https://svn.fhem.de/fhem/trunk@13208 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/75_MSG.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/fhem/FHEM/75_MSG.pm b/fhem/FHEM/75_MSG.pm index ca2fa8d25..23e5accbe 100755 --- a/fhem/FHEM/75_MSG.pm +++ b/fhem/FHEM/75_MSG.pm @@ -1806,10 +1806,15 @@ m/^(absent|disappeared|unauthorized|disconnected|unreachable)$/i # correct message format # - $loopMsg =~ s/\n/
/gi; + + # Replace new line with HTML break + # for e-mails + $loopMsg =~ s/\n/
\n/gi + if ( $type[$i] eq "mail" ); + + # Remove Sonos Speak commands $loopMsg =~ s/((|(\d+)| )\|\w+\|( |))/\n\n/gi - if ( $type[$i] ne "audio" ) - ; # Remove Sonos Speak commands + if ( $type[$i] ne "audio" ); # use command from device, global or internal default my $defCmd = "";