Edgewall Software

Changes between Version 23 and Version 24 of GenshiFaq


Ignore:
Timestamp:
Sep 11, 2006, 7:25:23 PM (18 years ago)
Author:
cmlenz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GenshiFaq

    v23 v24  
    9797
    9898Genshi provides a number of ways to do that:
    99  * The `Markup` class in the [ApiDocs/GenshiCore genshi.core] module can be used to flag strings that should not be escaped. Strings wrapped in a `Markup` instance get copied to the output unchanged.
    100  * The `XML` and `HTML` functions in the [ApiDocs/GenshiInput genshi.input] module parse XML and HTML strings, respectively, and produce a [wiki:Documentation/streams.html markup stream]. Note that this option can be rather expensive, as the text needs to be parsed just to be serialized again. Also, this method fails on bad markup that cannot be parsed by either [http://docs.python.org/lib/module-HTMLParser.html HTMLParser] or [http://docs.python.org/lib/module-xml.parsers.expat.html Expat].
    101  * If you are generating the snippets in question yourself, you may want to use the [ApiDocs/GenshiBuilder genshi.builder] to [wiki:Documentation/builder.html generate markup streams programmatically]. Just as the results of the `XML` and `HTML` functions discussed above, the stream produced using `genshi.builder` will not be escaped in the template output.
     99 * The `Markup` class in the [wiki:ApiDocs/genshi.core genshi.core] module can be used to flag strings that should not be escaped. Strings wrapped in a `Markup` instance get copied to the output unchanged.
     100 * The `XML` and `HTML` functions in the [wiki:ApiDocs/genshi.input genshi.input] module parse XML and HTML strings, respectively, and produce a [wiki:Documentation/streams.html markup stream]. Note that this option can be rather expensive, as the text needs to be parsed just to be serialized again. Also, this method fails on bad markup that cannot be parsed by either [http://docs.python.org/lib/module-HTMLParser.html HTMLParser] or [http://docs.python.org/lib/module-xml.parsers.expat.html Expat].
     101 * If you are generating the snippets in question yourself, you may want to use the [wiki:ApiDocs/genshi.builder genshi.builder] to [wiki:Documentation/builder.html generate markup streams programmatically]. Just as the results of the `XML` and `HTML` functions discussed above, the stream produced using `genshi.builder` will not be escaped in the template output.
    102102
    103103----