Forum
Parsing CSS as PHP producing > when > is used
As the title says... > (semi-colon removed) is produced when > (angle bracket) is used.
I have been successful in parsing CSS as PHP in most cases, however when an angle bracket is used, > is substituted so is there any way around this?
I have made past posts regarding parsing filetypes other than HTML as PHP however for the record, the templates I am using are as follows:
<?php include($_SERVER['DOCUMENT_ROOT'].'/perch/runtime.php');?>
<?php header('Content-type:text/css');?>
<?php perch_content_create('css_content',array('template'=>'_css_content.html'));?>
<?php perch_content_custom('css_content');?>
My html template is:
<perch:content id="cssinfo" type="textarea" label="CSS text"/>
An example of the CSS:
#accordion>div{padding-bottom:.25rem;}
Any further help or assistance would be appreciated.
If you want to enter code that shouldn't be HTML-escaped, add
html="true"
to your template tag.Hi Drew,
I've done that actually and it made no difference.
I also tried to enter the entities but Perch immediately converts them upon saving the form.
In addition, I tried
encode="false"
but that didn't work either.Did you re-save the content after changing the template?
Yes.
Do you think it may be due to the Web Server I am using?
No.
Make sure that the content hasn't already been encoded - it won't be decoded if it's already encoded.
That fixed it.
Thanks again Drew