Ok so im trying to improve my seo, and im messing about with meta tags, but i’m getting some weirdness. Something is converting & to an html entity.
if i do this manually,
<meta itemprop="name" content="<?= $site->seotitle(); ?>">
i get the desired result
<meta itemprop="name" content="Hash&Salt Web Design" />
If i do the same thing with the meta tags plugin on the title tag, it converts the & to an entity…
c::set('meta-tags.default', function(Page $page, Site $site) {
return [
'title' => $page->isHomePage()
? $site->seotitle()
: $page->seotitle().' | '.$site->seotitle(),
Results in:
<title>Hash&Salt Web Design</title>
How do i tell it not to? i tried $site->seotitle()->html()
and $site->seotitle()->value()
becuase im sure i read a similar question somewhere and i think that was the answer… but no luck. Any ideas?
Edit: Google tells me that its ok to have the entity in these tags, but I would still like to know why its ignoring me!