summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-11-17 19:37:01 -0800
committerKaz Kylheku <kaz@kylheku.com>2015-11-20 16:17:19 -0800
commite557d7bc37def93fb56196dd286b6a337fdfa0c4 (patch)
tree2358aebb110a3649e913e6f834cb4a478028a82b /txr.1
parent230b56a2da15cb6a7fb0855a78c81123d522cd61 (diff)
downloadtxr-e557d7bc37def93fb56196dd286b6a337fdfa0c4.tar.gz
txr-e557d7bc37def93fb56196dd286b6a337fdfa0c4.tar.bz2
txr-e557d7bc37def93fb56196dd286b6a337fdfa0c4.zip
New :to_html_relaxed filter and html-encode*.
* filter.c (to_html_relaxed_k): New keyword symbol variable. (to_html_relaxed_table): New static array. (html_encode_star): New static function. (filter_init): Initialize new symbol variable. Register new filter. Register html-encode* function. * txr.1: Documented :to_html_relaxed filter and html-encode* function.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.120
1 files changed, 19 insertions, 1 deletions
diff --git a/txr.1 b/txr.1
index 45d49946..62e48c8f 100644
--- a/txr.1
+++ b/txr.1
@@ -7629,6 +7629,14 @@ ampersand sequences. For instance
is replaced by
.codn &gt; .
+.coIP :to_html_relaxed
+Filter text to HTML, representing special characters using HTML
+ampersand sequences. Unlike
+.codn :to_html ,
+this filter doesn't treat the single and double quote characters.
+It is not suitable for preparing HTML fragments which end up
+inserted into HTML tag attributes.
+
.coIP :from_html
Filter text with HTML codes into text in which the codes are replaced by the
corresponding characters. For instance
@@ -35622,7 +35630,7 @@ encoded data are retained as
characters in the decoded strings. Otherwise,
plus characters are converted to spaces.
-.coNP Functions @ html-encode and @ html-decode
+.coNP Functions @, html-encode @, html-encode* and @ html-decode
.synb
.mets (html-encode << text-string )
.mets (html-decode << html-string )
@@ -35673,6 +35681,16 @@ From this,
produces
.strn "&lt;p&gt;Hello, world!&lt;/p&gt;" .
+The
+.code html-encode*
+function is similar to
+.code html-encode
+except that it does not encode the single and double quote characters
+(ASCII 39 and 34, respectively). Text prepared by this function may not
+be suitable for insertion into a HTML template, depending on the
+context of its insertion. It is suitable as text placed between
+tags but not necessary as tag attribute material.
+
.SS* Filter Module
The filter module provides a trie (pronounced "try") data structure,
which is suitable for representing dictionaries for efficient filtering.