[Templates] question: automatic entity decoding
[prev]
[thread]
[next]
[Date index for 2005/04/27]
This is a multi-part message in MIME format.
------_=_NextPart_001_01C54B4D.B3F1733C
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hi,
=20
Is there a feature in the Template Toolkit (specifically, the Perl front
end Template module) that will decode HTML entities in code snippets
before parsing the template file?
=20
The reason I need such a feature is that I want to allow non-developers
to edit template files in Dreamweaver, and that means template files
have to be valid HTML. For example, the code snippet [% IF count < 10 %]
is not valid HTML. If I encode HTML entities (<) then they will render
correctly in Dreamweaver, but then I would need a way to decode HTML
entities in code snippets before they are parsed by the Template process
method. Is such a feature readily available? I have been reading the
Perl documentation of Template.pm all morning, but I have not found any
hint that such a feature may exist.
=20
=20
Andrew Strader
=20
------_=_NextPart_001_01C54B4D.B3F1733C
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 10 (filtered)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{font-family:Arial;
color:windowtext;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dpurple>
<div class=3DSection1>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Hi,</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Is there a feature in the Template Toolkit =
(specifically,
the Perl front end Template module) that will decode HTML entities in =
code
snippets before parsing the template file?</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>The reason I need such a feature is that I want to =
allow non-developers
to edit template files in Dreamweaver, and that means template files =
have to be
valid HTML. For example, the code snippet [% IF count < 10 %] is not =
valid
HTML. If I encode HTML entities (&lt) then they will render =
correctly in
Dreamweaver, but then I would need a way to decode HTML entities in code
snippets before they are parsed by the Template process method. Is such =
a
feature readily available? I have been reading the Perl documentation of =
Template.pm
all morning, but I have not found any hint that such a feature may =
exist.</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Andrew Strader</span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'> </span></font></p>
</div>
</body>
</html>
------_=_NextPart_001_01C54B4D.B3F1733C--
_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates
 |
[Templates] question: automatic entity decoding
Andrew Strader 17:22 on 27 Apr 2005
|