diff options
| author | Craig Jennings <c@cjennings.net> | 2025-08-14 22:58:58 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-08-14 22:58:58 -0500 |
| commit | 82ba818ff456bcd6d56a06226e3f27e98fbb55c3 (patch) | |
| tree | 158cfc17b2f644a10f063cb546752cfaae12c97f /devdocs/go/html%2Findex.html | |
| parent | 9278ddd4ea1a8b1a4c1edaa8894516e3f48d245b (diff) | |
| download | dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.tar.gz dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.zip | |
removing all downloaded devdocs files
Diffstat (limited to 'devdocs/go/html%2Findex.html')
| -rw-r--r-- | devdocs/go/html%2Findex.html | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/devdocs/go/html%2Findex.html b/devdocs/go/html%2Findex.html deleted file mode 100644 index 27643e64..00000000 --- a/devdocs/go/html%2Findex.html +++ /dev/null @@ -1,23 +0,0 @@ -<h1> Package html </h1> <ul id="short-nav"> -<li><code>import "html"</code></li> -<li><a href="#pkg-overview" class="overviewLink">Overview</a></li> -<li><a href="#pkg-index" class="indexLink">Index</a></li> -<li><a href="#pkg-examples" class="examplesLink">Examples</a></li> -<li><a href="#pkg-subdirectories">Subdirectories</a></li> -</ul> <h2 id="pkg-overview">Overview </h2> <p>Package html provides functions for escaping and unescaping HTML text. </p> <h2 id="pkg-index">Index </h2> <ul id="manual-nav"> -<li><a href="#EscapeString">func EscapeString(s string) string</a></li> -<li><a href="#UnescapeString">func UnescapeString(s string) string</a></li> -</ul> <div id="pkg-examples"> <h3>Examples</h3> <dl> <dd><a class="exampleLink" href="#example_EscapeString">EscapeString</a></dd> <dd><a class="exampleLink" href="#example_UnescapeString">UnescapeString</a></dd> </dl> </div> <h3>Package files</h3> <p> <span>entity.go</span> <span>escape.go</span> </p> <h2 id="EscapeString">func <span>EscapeString</span> </h2> <pre data-language="go">func EscapeString(s string) string</pre> <p>EscapeString escapes special characters like "<" to become "&lt;". It escapes only five such characters: <, >, &, ' and ". UnescapeString(EscapeString(s)) == s always holds, but the converse isn't always true. </p> <h4 id="example_EscapeString"> <span class="text">Example</span> -</h4> <p>Code:</p> <pre class="code" data-language="go">const s = `"Fran & Freddie's Diner" <tasty@example.com>` -fmt.Println(html.EscapeString(s)) -</pre> <p>Output:</p> <pre class="output" data-language="go">&#34;Fran &amp; Freddie&#39;s Diner&#34; &lt;tasty@example.com&gt; -</pre> <h2 id="UnescapeString">func <span>UnescapeString</span> </h2> <pre data-language="go">func UnescapeString(s string) string</pre> <p>UnescapeString unescapes entities like "&lt;" to become "<". It unescapes a larger range of entities than EscapeString escapes. For example, "&aacute;" unescapes to "รก", as does "&#225;" and "&#xE1;". UnescapeString(EscapeString(s)) == s always holds, but the converse isn't always true. </p> <h4 id="example_UnescapeString"> <span class="text">Example</span> -</h4> <p>Code:</p> <pre class="code" data-language="go">const s = `&quot;Fran &amp; Freddie&#39;s Diner&quot; &lt;tasty@example.com&gt;` -fmt.Println(html.UnescapeString(s)) -</pre> <p>Output:</p> <pre class="output" data-language="go">"Fran & Freddie's Diner" <tasty@example.com> -</pre> <h2 id="pkg-subdirectories">Subdirectories</h2> <div class="pkg-dir"> <table> <tr> <th class="pkg-name">Name</th> <th class="pkg-synopsis">Synopsis</th> </tr> <tr> <td colspan="2"><a href="../index">..</a></td> </tr> <tr> <td class="pkg-name"> <a href="template/index">template</a> </td> <td class="pkg-synopsis"> Package template (html/template) implements data-driven templates for generating HTML output safe against code injection. </td> </tr> </table> </div><div class="_attribution"> - <p class="_attribution-p"> - © Google, Inc.<br>Licensed under the Creative Commons Attribution License 3.0.<br> - <a href="http://golang.org/pkg/html/" class="_attribution-link">http://golang.org/pkg/html/</a> - </p> -</div> |
