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
9fb7da89
Commit
9fb7da89
authored
Aug 17, 2010
by
Jordi Boggiano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a double escaping bug when a variable was assigned to another one
parent
3d47f4c2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
CHANGELOG
CHANGELOG
+1
-0
Compiler.php
lib/Dwoo/Compiler.php
+1
-1
BugTests.php
tests/BugTests.php
+10
-0
No files found.
CHANGELOG
View file @
9fb7da89
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
it
with
caution
it
with
caution
*
Fixed
PHP
parse
errors
being
generated
in
compiled
templates
when
*
Fixed
PHP
parse
errors
being
generated
in
compiled
templates
when
{
dynamic
}
was
nested
{
dynamic
}
was
nested
*
Fixed
a
double
escaping
bug
when
a
variable
was
assigned
to
another
one
*
Added
$
this
->
viewParam
support
to
ZendFramework
adapter
through
a
*
Added
$
this
->
viewParam
support
to
ZendFramework
adapter
through
a
Dwoo_Adapters_ZendFramework_Dwoo
class
that
extends
Dwoo
,
you
should
use
Dwoo_Adapters_ZendFramework_Dwoo
class
that
extends
Dwoo
,
you
should
use
this
if
you
called
setEngine
()
on
the
ZF
view
this
if
you
called
setEngine
()
on
the
ZF
view
...
...
lib/Dwoo/Compiler.php
View file @
9fb7da89
...
@@ -2214,7 +2214,7 @@ class Dwoo_Compiler implements Dwoo_ICompiler
...
@@ -2214,7 +2214,7 @@ class Dwoo_Compiler implements Dwoo_ICompiler
}
}
}
}
if
(
$this
->
autoEscape
===
true
)
{
if
(
$this
->
autoEscape
===
true
&&
$curBlock
!==
'condition'
)
{
$output
=
'(is_string($tmp='
.
$output
.
') ? htmlspecialchars($tmp, ENT_QUOTES, $this->charset) : $tmp)'
;
$output
=
'(is_string($tmp='
.
$output
.
') ? htmlspecialchars($tmp, ENT_QUOTES, $this->charset) : $tmp)'
;
}
}
...
...
tests/BugTests.php
View file @
9fb7da89
...
@@ -159,6 +159,16 @@ aaa
...
@@ -159,6 +159,16 @@ aaa
$this
->
dwoo
->
get
(
$tpl
,
array
());
$this
->
dwoo
->
get
(
$tpl
,
array
());
}
}
public
function
testDoubleEscapingOnAssignments
()
{
$tpl
=
new
Dwoo_Template_String
(
'{$bar = $foo}{$foo}{$bar}'
);
$tpl
->
forceCompilation
();
$cmp
=
new
Dwoo_Compiler
();
$cmp
->
setAutoEscape
(
true
);
$this
->
assertEquals
(
'a'ba'b'
,
$this
->
dwoo
->
get
(
$tpl
,
array
(
'foo'
=>
"a'b"
),
$cmp
));
}
}
}
function
Dwoo_Plugin_X_compile
(
Dwoo_Compiler
$cmp
,
$text
)
function
Dwoo_Plugin_X_compile
(
Dwoo_Compiler
$cmp
,
$text
)
...
...
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