Skip to content

Commit 7aba9f8

Browse files
committed
Vcproj.pm: urlencode '<' and '>' when generating VC projects
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent ea88620 commit 7aba9f8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

contrib/buildsystems/Generators/Vcproj.pm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ sub createLibProject {
5959
my $includes= join(";", sort(map("&quot;$rel_dir\\$_&quot;", @{$$build_structure{"LIBS_${libname}_INCLUDES"}})));
6060
my $cflags = join(" ", sort(@{$$build_structure{"LIBS_${libname}_CFLAGS"}}));
6161
$cflags =~ s/\"/&quot;/g;
62+
$cflags =~ s/</&lt;/g;
63+
$cflags =~ s/>/&gt;/g;
6264

6365
my $cflags_debug = $cflags;
6466
$cflags_debug =~ s/-MT/-MTd/;
@@ -80,6 +82,8 @@ sub createLibProject {
8082

8183
$defines =~ s/-D//g;
8284
$defines =~ s/\"/\\&quot;/g;
85+
$defines =~ s/</&lt;/g;
86+
$defines =~ s/>/&gt;/g;
8387
$defines =~ s/\'//g;
8488
$includes =~ s/-I//g;
8589
mkdir "$target" || die "Could not create the directory $target for lib project!\n";
@@ -271,6 +275,8 @@ sub createAppProject {
271275
my $includes= join(";", sort(map("&quot;$rel_dir\\$_&quot;", @{$$build_structure{"APPS_${appname}_INCLUDES"}})));
272276
my $cflags = join(" ", sort(@{$$build_structure{"APPS_${appname}_CFLAGS"}}));
273277
$cflags =~ s/\"/&quot;/g;
278+
$cflags =~ s/</&lt;/g;
279+
$cflags =~ s/>/&gt;/g;
274280

275281
my $cflags_debug = $cflags;
276282
$cflags_debug =~ s/-MT/-MTd/;
@@ -297,6 +303,8 @@ sub createAppProject {
297303

298304
$defines =~ s/-D//g;
299305
$defines =~ s/\"/\\&quot;/g;
306+
$defines =~ s/</&lt;/g;
307+
$defines =~ s/>/&gt;/g;
300308
$defines =~ s/\'//g;
301309
$defines =~ s/\\\\/\\/g;
302310
$includes =~ s/-I//g;

0 commit comments

Comments
 (0)