[Templates-cvs] cvs commit: Template2/docsrc/lib/misc filters

cvs@template-toolkit.org cvs@template-toolkit.org


cvs         06/01/30 13:43:17

  Modified:    docsrc/lib/misc filters
  Log:
  * updated docs to reflect the fact that the html filter also escapes "
  
  Revision  Changes    Path
  1.13      +6 -63     Template2/docsrc/lib/misc/filters
  
  Index: filters
  ===================================================================
  RCS file: /template-toolkit/Template2/docsrc/lib/misc/filters,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- filters	2003/07/01 12:42:55	1.12
  +++ filters	2006/01/30 13:43:16	1.13
  @@ -85,9 +85,9 @@
   
   =head2 html
   
  -Converts the characters 'E<lt>', 'E<gt>' and '&' to '&lt;', '&gt;' and
  -'&amp;', respectively, protecting them from being interpreted as
  -representing HTML tags or entities.
  +Converts the characters 'E<lt>', 'E<gt>', '&' and '"' to '&lt;',
  +'&gt;', '&amp;', and '&quot;' respectively, protecting them from being
  +interpreted as representing HTML tags or entities.
   
       [% FILTER html %]
       Binary "<=>" returns -1, 0, or 1 depending on...
  @@ -389,64 +389,7 @@
   
   =head2 latex(outputType)
   
  -Passes the text block to LaTeX and produces either PDF, DVI or
  -PostScript output.  The 'outputType' argument determines the output
  -format and it should be set to one of the strings: "pdf" (default),
  -"dvi", or "ps".
  -
  -The text block should be a complete LaTeX source file.
  -
  -    [% FILTER latex("pdf") -%]
  -    \documentclass{article}
  -
  -    \begin{document}
  -
  -    \title{A Sample TT2 \LaTeX\ Source File}
  -    \author{Craig Barratt}
  -    \maketitle
  -
  -    \section{Introduction}
  -    This is some text.
  -
  -    \end{document}
  -    [% END -%]
  -
  -The output will be a PDF file. You should be careful not to prepend or
  -append any extraneous characters or text outside the FILTER block,
  -since this text will wrap the (binary) output of the latex filter.
  -Notice the END directive uses '-%]' for the END_TAG to remove the
  -trailing new line.
  -
  -One example where you might prepend text is in a CGI script where
  -you might include the Content-Type before the latex output, eg:
  -
  -    Content-Type: application/pdf
  -
  -    [% FILTER latex("pdf") -%]
  -    \documentclass{article}
  -    \begin{document}
  -    ...
  -    \end{document}
  -    [% END -%]
  -
  -In other cases you might use the redirect filter to put the output
  -into a file, rather than delivering it to stdout.  This might be
  -suitable for batch scripts:
  -
  -    [% output = FILTER latex("pdf") -%]
  -    \documentclass{article}
  -    \begin{document}
  -    ...
  -    \end{document}
  -    [% END; output | redirect("document.pdf", 1) -%]
  -
  -(Notice the second argument to redirect to force binary mode.)
  -
  -Note that the latex filter runs one or two external programs, so it
  -isn't very fast.  But for modest documents the performance is adequate,
  -even for interactive applications.
  -
  -A error of type 'latex' will be thrown if there is an error reported
  -by latex, pdflatex or dvips.
  -
  +The latex() filter is no longer part of the core Template Toolkit
  +distribution as of version 2.15.  You can download it as a 
  +separate Template-Latex distribution from CPAN.