Commit 62996b10 authored by Leigh Stoller's avatar Leigh Stoller

Minor fixes for string quoting in NS descriptions (which are converted to

geni-lib tour descriptions).
parent 91a46ff6
......@@ -177,8 +177,11 @@ if (defined($experiment)) {
$ns .= "$line\n";
if ($line =~ /^set\s+(.*)\s+\[new Simulator/) {
$ns .= "\$" . $1 . " description \"" .
$experiment->description() . "\"\n";
my $text = $experiment->description();
my $nsn = $1;
$text =~ s/\"/\\"/g;
$ns .= "\$" . $nsn . " description \"$text\"\n";
}
}
open(NS, ">$nsfile")
......
......@@ -521,6 +521,7 @@ if (defined($rspec_tour)) {
AddStatement("Tour = emulab.Tour()");
if (defined($description)) {
my $text = $description->textContent();
$text =~ s/\'/\\'/g;
AddStatement("Tour.Description(emulab.Tour.TEXT, '$text')");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment