Author: Britta
Automatic escape is mainly developed for general-purpose template systems, that is, those template systems that do not fully understand the structure of their running content and programming languages. These template systems can
Open PHP Security Mode (note that PHP5.3 will no longer have safe mode)
The Safe mode of turning PHP on or off is taking advantage of the Safe_mode option in php.ini:
The code is as follows
Copy Code
Safe_mode=on (using
◇ How can I help myself in the face of fire?① Search for emergency doorsThe study found that many of the seven, eight, or even more than 10 people were burned and killed in the area near the door due to spontaneous combustion of vehicles, this shows
Read Catalogue
1.HTML Escape
2. Characters that will be automatically escaped
3. Turn off escape
4. String literals
Back to top of 1. HTML escape
Django automatically HTML-escapes the string, such as the following
Usually if something needs to be coded, it means that something is not suitable for transmission. There are a variety of reasons, such as size too large to contain private data, and for URLs, the reason for encoding is because some characters in the
PHP extension text processing -- PCRE regular expression syntax 3 -- escape sequence (backslash) backlash has multiple usage. First, if it is followed by a non-alphanumeric character, it indicates that the special meaning represented by this
Transferred from: http://blog.csdn.net/joker_zhou/article/details/7322801(1) Publish: A publication refers to an object that stores its references to a place where other code can be accessed, returns the reference in a non-private method, or passes
HTML escape
Django automatically HTML-escapes the string, such as the following values in the template:
视图代码:def index(request): return render(request, ‘temtest/index2.html‘, { ‘t1‘: ‘hello‘
First, we need to know that the database is made up of tables, when you insert data into one of the tables, such as numbers, words, etc.Insertion can be inserted normally, but once you insert special characters, such as inserting the contents of the
--HTML escape# will include HTML tags output, not interpreted execution, because when the user commits the # string, may contain some offensive code, such as JS script;--Automatically escaped characters in Django# converted to ># ' (single
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.