phpti
phpti copied to clipboard
somehow trim whitespace when blocks are placed in attributes
<meta name='description' content='<? emptyblock('metadescription') ?>' />
....
<? startblock('metadescription') ?>
my value
<? endblock() ?>
.... don't want this ....
<meta name='description' content='
my value
' />
PHPTI NEEDS TO BE SMARTER ABOUT THIS
According to http://phpti.com/#block-filters , you can write
<? startblock('metadescription', 'trim') ?>
my value
<? endblock() ?>
yeah, good point. but it'd be cool to transparently do this somehow, without the need to reference the trim filter. maybe that would be too hairy though, and this is the ideal solution