PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTML » HTML_Template_Flexy » Bug #4686

Template vars inside HTML <script> tags are ignored

Details

Submitted2005-06-26 17:54 UTC
Fromjo at feuersee dot de
StatusBogus
PackageHTML_Template_Flexy
PHP Version5.0.4
OSLinux
Roadmaps(Not assigned)

Comments

[2005-06-26 17:54 UTC] jo at feuersee dot de

Description:
------------
template:
<script type="text/javascript">
{if:js}{js:h}{end:}
</script>
--eof

However, the template doesn't seem to get parsed and is
passed as-is.
The template vars are parsed and replaced if placed
outside the <script> tag.

Reproduce code:
---------------
template:
<script type="text/javascript">
{if:js}{js:h}{end:}
</script>
--eof

$this->js = "foo;\n";
require_once('HTML/Template/Flexy.php');
$this->out = new HTML_Template_Flexy($this->options);
$this->out->compile($template);

if(empty($obj)) {
$obj = &$this;
}
$this->out->outputObject($obj, $this->elements);

Expected result:
----------------
<script type="text/javascript">
foo;
</script>

Actual result:
--------------
<script type="text/javascript">
{if:js}{js:h}{end:}
</script>

[2005-06-27 10:10 UTC] jo at feuersee dot de

THX
Uhm ... any chance the flexy:XXX stuff will get
documented? I have the feeleing there is more than just
this exception.
And as long as it isn't documented, it is a bug. ;)