You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by ka...@apache.org on 2004/05/05 08:02:58 UTC
cvs commit: tcl-rivet/doc rivet.xml
karl 2004/05/04 23:02:58
Modified: . ChangeLog
doc rivet.xml
Log:
Added documentation for the escape_string, unescape_string,
escape_sgml_chars, and escape_shell_command commands.
Revision Changes Path
1.178 +5 -0 tcl-rivet/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /home/cvs/tcl-rivet/ChangeLog,v
retrieving revision 1.177
retrieving revision 1.178
diff -u -r1.177 -r1.178
--- ChangeLog 5 May 2004 00:33:37 -0000 1.177
+++ ChangeLog 5 May 2004 06:02:58 -0000 1.178
@@ -1,3 +1,8 @@
+2004-05-05 Karl Lehenbauer <ka...@sc.com>
+
+ * doc/rivet.xml: Documented the escape_string, unescape_string,
+ escape_sgml_chars, and escape_shell_command functions.
+
2004-05-04 Karl Lehenbauer <ka...@sc.com>
* rivet/packages/dio/diodisplay.tcl: Added enhancements from
1.47 +113 -2 tcl-rivet/doc/rivet.xml
Index: rivet.xml
===================================================================
RCS file: /home/cvs/tcl-rivet/doc/rivet.xml,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- rivet.xml 5 Apr 2004 10:40:42 -0000 1.46
+++ rivet.xml 5 May 2004 06:02:58 -0000 1.47
@@ -1398,6 +1398,117 @@
</refsect1>
</refentry>
+ <refentry>
+ <refnamediv>
+ <refname>escape_string</refname>
+ <refpurpose>convert a string into escaped characters.</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>escape_string</command>
+ <arg>string</arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Description</title>
+ <para>
+ Scans through each character in the specified string looking
+ for special characters, escaping them as needed, mapping
+ special characters to a quoted hexadecimal equivalent,
+ returning the result.
+ </para>
+ <para>
+ This is useful for quoting strings that are going to be
+ part of a URL.
+ </para>
+ </refsect1>
+ </refentry>
+
+ <refentry>
+ <refnamediv>
+ <refname>escape_sgml_chars</refname>
+ <refpurpose>escape special SGML characters in a string.</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>escape_sgml_chars</command>
+ <arg>string</arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Description</title>
+ <para>
+ Scans through each character in the specified string looking
+ for any special (with respect to SGML, and hence HTML) characters
+ from the specified string, and returns the result.
+ For example, the right angle
+ bracket is escaped to the corrected ampersand gt symbol.
+ </para>
+ </refsect1>
+ </refentry>
+
+ <refentry>
+ <refnamediv>
+ <refname>escape_shell_command</refname>
+ <refpurpose>escape shell metacharacters in a string.</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>escape_shell_command</command>
+ <arg>string</arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Description</title>
+ <para>
+ Scans through each character in the specified string looking
+ for any shell metacharacters, such as asterisk, less than and
+ greater than, parens, square brackets, curly brackets, angle
+ brackets, dollar signs, backslashes, semicolons, ampersands,
+ vertical bars, etc.
+ </para>
+ <para>
+ For each metacharacter found, it is quoted in the result by
+ prepending it with a backslash, returning the result.
+ </para>
+ </refsect1>
+ </refentry>
+
+ <refentry>
+ <refnamediv>
+ <refname>unescape_string</refname>
+ <refpurpose>unescape escaped characters in a string.</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>unescape_string</command>
+ <arg>string</arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Description</title>
+ <para>
+ Scans through each character in the specified string looking
+ for escaped character sequences (characters containing a
+ percent sign and two hexadecimal characters, unescaping them
+ back to their original character values, as needed, also mapping
+ plus signs to spaces, and returning the result.
+ </para>
+ <para>
+ This is useful for unquoting strings that have been quoted to
+ be part of a URL.
+ </para>
+ </refsect1>
+ </refentry>
+
</section>
<section id="examples">
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-cvs-help@tcl.apache.org