Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
bcb9385d
Commit
bcb9385d
authored
Feb 10, 2014
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 926085: Forbird single quotes to delimit URLs (no <a href='...'>)
r=dkl a=glob
parent
1ef5cef3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
004template.t
t/004template.t
+15
-1
No files found.
t/004template.t
View file @
bcb9385d
...
@@ -20,7 +20,7 @@ use CGI qw(-no_debug);
...
@@ -20,7 +20,7 @@ use CGI qw(-no_debug);
use File::Spec;
use File::Spec;
use Template;
use Template;
use Test::More tests => ( scalar(@referenced_files) + $num_actual_files );
use Test::More tests => ( scalar(@referenced_files) +
2 *
$num_actual_files );
# Capture the TESTOUT from Test::More or Test::Builder for printing errors.
# Capture the TESTOUT from Test::More or Test::Builder for printing errors.
# This will handle verbosity for us automatically.
# This will handle verbosity for us automatically.
...
@@ -104,6 +104,20 @@ foreach my $include_path (@include_paths) {
...
@@ -104,6 +104,20 @@ foreach my $include_path (@include_paths) {
ok(0, "$path has bad syntax --ERROR");
ok(0, "$path has bad syntax --ERROR");
print $fh $data . "\n";
print $fh $data . "\n";
}
}
# Make sure no forbidden constructs are present.
local $/;
open(FILE, '<', $path) or die "Can't open $file: $!\n";
$data = <FILE>;
close (FILE);
# Forbid single quotes to delimit URLs, see bug 926085.
if ($data =~ /href=\\?'/) {
ok(0, "$path contains blacklisted constructs: href='...'");
}
else {
ok(1, "$path contains no blacklisted constructs");
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment