This repository was archived by the owner on Jan 31, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -243,7 +243,7 @@ public function itemToString(stdClass $item)
243
243
if (! in_array ($ key , $ this ->modifierKeys )) {
244
244
continue ;
245
245
}
246
- $ modifiersString .= $ key . ' =" ' . $ this ->escapeAttribute ($ value ) . ' " ' ;
246
+ $ modifiersString .= sprintf ( ' %s="%s" ' , $ key , $ this ->autoEscape ? $ this -> escapeAttribute ($ value ) : $ value ) ;
247
247
}
248
248
249
249
$ modifiersString = rtrim ($ modifiersString );
@@ -271,8 +271,8 @@ public function itemToString(stdClass $item)
271
271
$ meta = sprintf (
272
272
$ tpl ,
273
273
$ type ,
274
- $ this ->escapeAttribute ($ item ->$ type ),
275
- $ this ->escapeAttribute ($ item ->content ),
274
+ $ this ->autoEscape ? $ this -> escapeAttribute ($ item ->$ type ) : $ item -> $ type ,
275
+ $ this ->autoEscape ? $ this -> escapeAttribute ($ item ->content ) : $ item -> content ,
276
276
$ modifiersString
277
277
);
278
278
Original file line number Diff line number Diff line change @@ -615,4 +615,10 @@ public function testConditionalNoIEWidthSpace()
615
615
$ this ->assertContains ('<!--[if ! IE]><!-->< ' , $ html );
616
616
$ this ->assertContains ('<!--<![endif]--> ' , $ html );
617
617
}
618
+
619
+ public function testTurnOffAutoEscapeDoesNotEncode ()
620
+ {
621
+ $ this ->helper ->setAutoEscape (false )->appendHttpEquiv ('foo ' , 'bar=baz ' );
622
+ $ this ->assertEquals ('<meta http-equiv="foo" content="bar=baz" /> ' , $ this ->helper ->toString ());
623
+ }
618
624
}
You can’t perform that action at this time.
0 commit comments