Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit 0a98f6c

Browse files
committed
Bugfixing for @froshdesign
1 parent 86e74fc commit 0a98f6c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Helper/HeadMeta.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ public function itemToString(stdClass $item)
243243
if (! in_array($key, $this->modifierKeys)) {
244244
continue;
245245
}
246-
$modifiersString .= $key . '="' . (($this->autoEscape) ? $this->escapeAttribute($value) : $value) . '" ';
246+
$modifiersString .= sprintf('%s="%s"', $key, $this->autoEscape ? $this->escapeAttribute($value) : $value);
247247
}
248248

249249
$modifiersString = rtrim($modifiersString);
@@ -271,8 +271,8 @@ public function itemToString(stdClass $item)
271271
$meta = sprintf(
272272
$tpl,
273273
$type,
274-
($this->autoEscape) ? $this->escapeAttribute($item->$type) : $item->$type,
275-
($this->autoEscape) ? $this->escapeAttribute($item->content) : $item->content,
274+
$this->autoEscape ? $this->escapeAttribute($item->$type) : $item->$type,
275+
$this->autoEscape ? $this->escapeAttribute($item->content) : $item->content,
276276
$modifiersString
277277
);
278278

test/Helper/HeadMetaTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,6 @@ public function testConditionalNoIEWidthSpace()
619619
public function testTurnOffAutoEscapeDoesNotEncode()
620620
{
621621
$this->helper->setAutoEscape(false)->appendHttpEquiv('foo', 'bar=baz');
622-
$this->assertNotEquals('<meta http-equiv="foo" content="bar=baz">', $this->helper->toString());
622+
$this->assertEquals('<meta http-equiv="foo" content="bar=baz" />', $this->helper->toString());
623623
}
624624
}

0 commit comments

Comments
 (0)