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 a url for special purposes and must be url encoded. The encoding format is % plus the characters' ascii code, that is, a percent sign %, followed by the corresponding characters' ascii (hexadecimal) code value. Special characters in the url must be escaped. 1. replace space with the plus sign (+). 2. separate directories and subdirectories with a forward slash (/). 3. question mark (?) Separate url and query 4. percent sign (%). Special characters 5 and # are specified. bookmarks 6 and & # are separated. Url special symbols and the corresponding hexadecimal value encoding: 1. + the + sign in the url indicates space % 2b2. the space in the space url can be a plus sign (+) or encoded as % 203. /separate directories and subdirectories % 2f4 .? Separate the actual url and parameter % 3f5.% special character % 256. # indicates bookmarks % 237. & the delimiter % 268 between the parameters specified in the url. = the value of the specified parameter in the url % 3d Functions for processing url escape characters in js such as escape, encodeuri, and encodeuricomponentphp filter parameters special characters prevent injection of php filter methods for illegal and special strings php instance: the example of a special character processing function replaces the php code of special characters in ultra-long text |