|
PHP htmlspecialchars()
string htmlspecialchars (string $string [, int $quote_style [, string $charset [, bool $double_encode]]]) Many HTML character entities must be written in a certain way. This function converts some of these characters. To translate every HTML character entities you may use the htmlentities() function. This function is particularly useful to avoid that users can post HTML markup in a forum, in this case one it is recommended to use a BBcode-like function that can allow users to type in example [i] instead of <i>. By using the htmlspecialchars() function '&' (ampersand) will become '&' '"' (double quote) will become '"' if ENT_NOQUOTES is not set. ''' (single quote) will become ''' if ENT_QUOTES is set. '<' will become '<' '>' will become '>' The quote_style argument (optional) tells the function what to do with the single and double quote characters. By default the mode is ENT_COMPAT, it only translates the double-quote character, the single-quote remains untranslated. If ENT_QUOTES is set, both single and double quotes are translated, if ENT_NOQUOTES is set neither single nor double quotes are translated. The charset argument (optional) defines the character set used in conversion. By default the character set is ISO-8859-1 but you may also use these character sets, supported in PHP 4.3.0 and later. ISO-8859-1 ISO8859-1 Western European, Latin-1 ISO-8859-15 ISO8859-15 Western European, Latin-9. UTF-8 ASCII compatible multi-byte 8-bit Unicode. cp866 ibm866, 866 DOS-specific Cyrillic charset. cp1251 Windows-1251, win-1251, 1251 Windows-specific Cyrillic charset. cp1252 Windows-1252, 1252 Windows specific charset Western European KOI8-R koi8-ru, koi8r Russian. BIG5 950 Traditional Chinese (Taiwan). GB2312 936 Simplified Chinese (National character set). BIG5-HKSCS Big5 with Hong Kong extensions, Traditional Chinese. Shift_JIS SJIS, 932 Japanese EUC-JP EUCJP Japanese dario (2010-04-05 16:28:23) PHP htmlspecialchars() Nice article on my opinion. But I think that myphpform.com can gathered information from php tutorials. *temule (2010-06-17 15:42:42) 14 years ago <img src = "image / img1.jpeg"> See also ficgs More websites You must register to see these links, as this is a collaborative page, then you may change the order of the links by clicking the icons before the titles. admin Other websites The following links might be less relevant, please change their ranks if you find them useful. ![]() ![]() phpbuilder > board/showthread.
![]() ![]() kevin.vanzonneveld > techblog/article/javascript equivalent for ![]() ![]() php.about > od ![]() ![]() voormedia > en/tools/html encode string conversion htmlspecialchars. If you are a designer and in need of help by one of the programmers... ![]() ![]() phphelper.wordpress ![]() ![]() forums.b2evolution > viewtopic. ![]() ![]() railsforphp > reference/strings/htmlspecialchars Are you a PHP developer interested in the Ruby on Rails... Looking for Rails or PHP web application development,... ![]() ![]() nabble > Tickets 7305 broken ![]() ![]() dynamicdrive > forums/showthread. ![]() ![]() experts exchange > Web Development/Web Languages Standards ![]() ![]() fzs8 ![]() ![]() bigresource ![]() ![]() algorytmy > doc zaznacz działy do przeszukania (brak wyboru = wszystkie... O wysokich kompetencjach zawodowych Darka nie ma co... ![]() ![]() lists.horde > archives/bugs/Week of Mon 20080908/038936 ...| broken php htmlspecialchars workaround needed Queue... [Tickets #7281] Re: First Email from vCard ends up in email by... ...ote: php htmlspecialchars function is stupid: When presented with... ![]() ![]() jp.php > htmlspecialchars To reverse the action of htmlspecialchars(), use this code:... used this function for making a variable javascript compatible... Here's something that replicates the appearance of... ![]() ![]() fr.php > htmlspecialchars To reverse the action of htmlspecialchars(), use this code:... used this function for making a variable javascript compatible... ![]() ![]() freebsd > listserv/archive/users l/2006q2/016478 PHP, htmlspecialchars(), charset iso-8859-2 not... Zkusil bych zminovany UTF-8 zpusob, jinak to zrejme... ![]() ![]() thaicreate Certain characters have special significance in HTML, and should... Any other character sets are not recognized and ISO-8859-1 will... ![]() ![]() kenhmuaban > manual ![]() ![]() secunia > advisories/22653 Fujitsu Interstage Products IP Address Restriction Bypass Security... Joomla! Mosets Tree Component Cross-Site Request Forgery... Please provide information about patches, mitigating factors,... ![]() ![]() plus2net Now to display the code for the above line formatted in different... Separating domain and userid part from an email address using... Random string generator with number and alphabets for... ![]() ![]() cvs.moodle > contrib/plugins/mod/feedback/edit. ![]() ![]() programmingtalk > showthread. ![]() ![]() archives.free.net > message/20080908.145636.b4faf69c.it ![]() ![]() home.earthlink > ~kengeddes/cs85/lectureNotes/strings if one operand is a number, other operand is cast to a... two types of URL encoding - spaces handled differently... ![]() ![]() objectmix ![]() ![]() myphpform > validating forms. and simply call this function whenever we need to... function, strips any quotes escaped with slashes and... ![]() ![]() goldvision > us/en/manuals ![]() ![]() mambo developer > api/administrator/modules/mod components. /** ensure this file is being included by a parent file... FUNC_DATA={ 'loadobjectlist': ['loadobjectlist', 'Load a list of... There's no trackback at the moment.
[Games online]
[Last topics]
[Glossary]
[Help]
[Membership]
[About]
[Social network] [Hot news] [Discussions] [Seo forums] [Meet people] [Directory] |