summaryrefslogtreecommitdiff
path: root/tools/parse_companies.pl
diff options
context:
space:
mode:
authorMike Ryan <mikeryan@lacklustre.net>2016-08-10 07:52:57 -0700
committerMarcel Holtmann <marcel@holtmann.org>2016-09-14 14:51:05 +0200
commit1b94ec589e2d1c3f84998c34fd8b64292654d6dc (patch)
tree210ff98ec76c49577c795297cd6b714eb343ce67 /tools/parse_companies.pl
parent6a76969d6ea91004838f5afac2836fa69bcd7371 (diff)
downloadbluez-1b94ec589e2d1c3f84998c34fd8b64292654d6dc.tar.gz
tools: escape double quotes in company names
Double quotes in company names are properly escaped so that they are valid C string literals.
Diffstat (limited to 'tools/parse_companies.pl')
-rwxr-xr-xtools/parse_companies.pl1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/parse_companies.pl b/tools/parse_companies.pl
index f755390b5..99d3f31d3 100755
--- a/tools/parse_companies.pl
+++ b/tools/parse_companies.pl
@@ -51,6 +51,7 @@ while (<>) {
my $name = uri_decode($1);
$name =~ s/^\s+//g; # kill leading
$name =~ s/\s+$//g; # and trailing space
+ $name =~ s/"/\\"/g; # escape double quotes
my $id = hex($identifier);
if ($id != 65535) {
print "\tcase $id:\n";