<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://ubersoft.org/Sputnik/wiki/skins/common/feed.css?301"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
		<id>http://ubersoft.org/Sputnik/wiki/index.php?action=history&amp;feed=atom&amp;title=Core_Function_HTMLSpecialChars</id>
		<title>Core Function HTMLSpecialChars - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://ubersoft.org/Sputnik/wiki/index.php?action=history&amp;feed=atom&amp;title=Core_Function_HTMLSpecialChars"/>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_HTMLSpecialChars&amp;action=history"/>
		<updated>2026-04-12T00:45:32Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.17.0</generator>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_HTMLSpecialChars&amp;diff=4818&amp;oldid=prev</id>
		<title>UberFoX: 1 revision</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_HTMLSpecialChars&amp;diff=4818&amp;oldid=prev"/>
				<updated>2015-06-14T12:37:37Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 12:37, 14 June 2015&lt;/td&gt;
		&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_HTMLSpecialChars&amp;diff=4817&amp;oldid=prev</id>
		<title>UberFoX: 1 revision</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_HTMLSpecialChars&amp;diff=4817&amp;oldid=prev"/>
				<updated>2014-08-11T21:41:05Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 21:41, 11 August 2014&lt;/td&gt;
		&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_HTMLSpecialChars&amp;diff=3233&amp;oldid=prev</id>
		<title>UberFoX: Created page with &quot;&lt;pre&gt; HTMLSpecialChars( &lt;string&gt;, &lt;flags&gt;, &lt;encoding&gt;, &lt;double_encode&gt; ) &lt;/pre&gt;  === Description ===  Convert special characters to HTML entities.  === Parameters ===  ==== strin...&quot;</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_HTMLSpecialChars&amp;diff=3233&amp;oldid=prev"/>
				<updated>2013-09-21T01:42:42Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;pre&amp;gt; HTMLSpecialChars( &amp;lt;string&amp;gt;, &amp;lt;flags&amp;gt;, &amp;lt;encoding&amp;gt;, &amp;lt;double_encode&amp;gt; ) &amp;lt;/pre&amp;gt;  === Description ===  Convert special characters to HTML entities.  === Parameters ===  ==== strin...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
HTMLSpecialChars( &amp;lt;string&amp;gt;, &amp;lt;flags&amp;gt;, &amp;lt;encoding&amp;gt;, &amp;lt;double_encode&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Convert special characters to HTML entities.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== string====&lt;br /&gt;
&lt;br /&gt;
The string being converted. &lt;br /&gt;
&lt;br /&gt;
==== flags ====&lt;br /&gt;
&lt;br /&gt;
A bitmask of one or more of the following flags, which specify how to handle quotes, invalid code unit sequences and the used document type.&lt;br /&gt;
&lt;br /&gt;
The default is @ENT_COMPAT.&lt;br /&gt;
&lt;br /&gt;
Available flags constants&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Constant Name 	   Description&lt;br /&gt;
@ENT_COMPAT 	   Will convert double-quotes and leave single-quotes alone.&lt;br /&gt;
@ENT_QUOTES 	   Will convert both double and single quotes.&lt;br /&gt;
@ENT_NOQUOTES 	   Will leave both double and single quotes unconverted.&lt;br /&gt;
@ENT_IGNORE 	   Silently discard invalid code unit sequences instead of&lt;br /&gt;
                   returning an empty string. Using this flag is discouraged&lt;br /&gt;
                   as it » may have security implications.&lt;br /&gt;
@ENT_SUBSTITUTE    Replace invalid code unit sequences with a Unicode Replacement&lt;br /&gt;
                   Character U+FFFD (UTF-8) or &amp;amp;#FFFD; (otherwise) instead of&lt;br /&gt;
                   returning an empty string.&lt;br /&gt;
@ENT_DISALLOWED	   Replace invalid code points for the given document type with&lt;br /&gt;
                   a Unicode Replacement Character U+FFFD (UTF-8) or &amp;amp;#FFFD; (otherwise)&lt;br /&gt;
                   instead of leaving them as is. This may be useful, for instance, to&lt;br /&gt;
                   ensure the well-formedness of XML documents with embedded external content.&lt;br /&gt;
@ENT_HTML401 	   Handle code as HTML 4.01.&lt;br /&gt;
@ENT_XML1 	   Handle code as XML 1.&lt;br /&gt;
@ENT_XHTML 	   Handle code as XHTML.&lt;br /&gt;
@ENT_HTML5 	   Handle code as HTML 5. &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== encoding ====&lt;br /&gt;
&lt;br /&gt;
Defines encoding used in conversion.&lt;br /&gt;
&lt;br /&gt;
Currently this parameter is totally ignored and is provided only to be PHP friendly and reserved for future use.&lt;br /&gt;
&lt;br /&gt;
I recommend setting this to &amp;quot;UTF-8&amp;quot; just to ensure futile compatibility&lt;br /&gt;
&lt;br /&gt;
==== double_encode ====&lt;br /&gt;
&lt;br /&gt;
When double_encode is turned off Sputnik will not encode existing html entities, the default is to convert everything.&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
The converted string.&lt;br /&gt;
&lt;br /&gt;
If the input string contains an invalid code unit sequence within the given encoding an empty string will be returned, unless either the @ENT_IGNORE or @ENT_SUBSTITUTE flags are set. &lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$new = htmlspecialchars(&amp;quot;&amp;lt;a href='test'&amp;gt;Test&amp;lt;/a&amp;gt;&amp;quot;, @ENT_QUOTES);&lt;br /&gt;
echo &amp;quot;$new\n&amp;quot;; // &amp;amp;lt;a href=&amp;amp;#039;test&amp;amp;#039;&amp;amp;gt;Test&amp;amp;lt;/a&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
$back = htmlspecialcharsdecode(&amp;quot;$new&amp;quot;, @ENT_QUOTES);&lt;br /&gt;
echo &amp;quot;$back\n&amp;quot;; // &amp;lt;a href='test'&amp;gt;Test&amp;lt;/a&amp;gt;&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Core Function]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	</feed>