mirror of
https://github.com/getformwork/formwork.git
synced 2025-01-29 11:31:19 +01:00
Escape meta attributes to avoid XSS injection
This commit is contained in:
parent
257150aee2
commit
f5312015a5
@ -1,9 +1,9 @@
|
||||
<?php foreach ($page->metadata() as $meta) : ?>
|
||||
<?php if ($meta->isCharset()) : ?>
|
||||
<meta charset="<?= $meta->content() ?>">
|
||||
<meta charset="<?= $this->escapeAttr($meta->content()) ?>">
|
||||
<?php elseif ($meta->isHTTPEquiv()) : ?>
|
||||
<meta http-equiv="<?= $meta->name() ?>" content="<?= $meta->content() ?>">
|
||||
<meta http-equiv="<?= $this->escapeAttr($meta->name()) ?>" content="<?= $this->escapeAttr($meta->content()) ?>">
|
||||
<?php else : ?>
|
||||
<meta <?= $meta->prefix() === 'og' ? 'property' : 'name' ?>="<?= $meta->name() ?>" content="<?= $meta->content() ?>">
|
||||
<meta <?= $meta->prefix() === 'og' ? 'property' : 'name' ?>="<?= $this->escapeAttr($meta->name()) ?>" content="<?= $this->escapeAttr($meta->content()) ?>">
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
Loading…
x
Reference in New Issue
Block a user