Skip to content

Commit

Permalink
fix: ensure windows newlines don't break panels (#6254)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanegigandet authored Jan 7, 2022
1 parent f69e9a9 commit 74e9b3a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ProductOpener/KnowledgePanels.pm
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ The function converts the multiline string into a single line string.

sub convert_multiline_string_to_singleline($) {
my $line = shift;
$line =~ s/\n/\\n/sg;
# \R will match all Unicode newline sequence
$line =~ s/\R/\\n/sg;
# Escape quotes unless they have been escaped already
# negative look behind to not convert \" to \\"
$line =~ s/(?<!\\)"/\\"/g;
Expand Down

0 comments on commit 74e9b3a

Please sign in to comment.