Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
Dwoo
Project
Overview
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
Common
Dwoo
Commits
7869a71a
Commit
7869a71a
authored
Jul 03, 2008
by
Seldaek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+ Added a test for auto escape used in params
git-svn-id:
svn://dwoo.org/dwoo/trunk@120
0598d79b-80c4-4d41-97ba-ac86fbbd088b
parent
c2680477
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
CompilerTests.php
tests/CompilerTests.php
+12
-0
No files found.
tests/CompilerTests.php
View file @
7869a71a
...
@@ -505,6 +505,18 @@ replace="BAR"
...
@@ -505,6 +505,18 @@ replace="BAR"
$this
->
assertEquals
(
"a<b>ca<b>c"
,
$this
->
dwoo
->
get
(
$tpl
,
array
(
'foo'
=>
'a<b>c'
),
$cmp
));
$this
->
assertEquals
(
"a<b>ca<b>c"
,
$this
->
dwoo
->
get
(
$tpl
,
array
(
'foo'
=>
'a<b>c'
),
$cmp
));
}
}
public
function
testAutoEscapeWithFunctionCall
()
{
$cmp
=
new
Dwoo_Compiler
();
$cmp
->
setAutoEscape
(
true
);
$this
->
assertEquals
(
true
,
$cmp
->
getAutoEscape
());
$tpl
=
new
Dwoo_Template_String
(
'{upper $foo}{upper $foo|safe}'
);
$tpl
->
forceCompilation
();
$this
->
assertEquals
(
"A<B>CA<B>C"
,
$this
->
dwoo
->
get
(
$tpl
,
array
(
'foo'
=>
'a<b>c'
),
$cmp
));
}
public
function
testPhpInjection
()
public
function
testPhpInjection
()
{
{
$tpl
=
new
Dwoo_Template_String
(
'{$foo}'
);
$tpl
=
new
Dwoo_Template_String
(
'{$foo}'
);
...
...
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