Special character escape methods in url links
This article describes how to escape special characters in a url link. learn how to escape characters. For more information, see.Special characters in a url cannot be directly transmitted in
The first time I used the template smarttemplate, it was much smaller than smarty, but it was inconvenient. Smarty can encode the url directly, such! -- {$ Var | urlencode} -- it seems that there is no link in smarttemplate. Because the link is
Smarty can encode URLs directly, such as
But in the smarttemplate as if there is no, because the link is submitted by JS, not the form submission, so it cannot be automatically encoded.
Workaround: Use JS to the URL of the Chinese character escape
Smarty can encode URLs directly, such as
But in the smarttemplate inside as if not, because the link is submitted by JS, rather than form submission, so can not automatically encode.
Solution: Use JS to the URL of the Chinese characters to escape
: This article mainly introduces php programming notes. if you are interested in PHP tutorials, please refer to them. Three methods for php to obtain POST data
Php image watermarking source code
Php + ajax + json is the simplest example.
Php Chinese
The first time I used the template smarttemplate, it was much smaller than smarty, but it was inconvenient.
The first time I used the template smarttemplate, it was much smaller than smarty, but it was inconvenient.
Smarty can directly encode
Name of function
Use
Note
Htmlspecialchars
will be with &&, single and double quotes ' ",Greater than >, less than
&&->&'->& #039"->"<>->>
Htmlentities
Turn all characters into HTML
Php programming notes-three methods for obtaining POST data from small_123 php
Php image watermarking source code
Php + ajax + json is the simplest example.
Php Chinese character to pinyin source code
Php traverses the Directory, generates the md5
Three ways to get post data from PHP
PHP image plus watermark source code
One of the simplest examples of Php+ajax+json
PHP Chinese Pinyin Source code
PHP iterates through directories, generates MD5 values for each file in the directory, and writes
The first time I used the template smarttemplate, it was much smaller than smarty, but it was inconvenient. Smarty can directly encode the url, such
But it does not seem to have been found in smarttemplate. because the link is submitted by js,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.