This article introduced the URL link in the special character escapes the method, learns the method of the escape character, has the need friend reference. Special characters in URL addresses have special uses in URLs that cannot be passed directly to URLs, and URL encoding is required. The encoded format is: The ASCII code of the% plus character, which is a percent percent, followed by the ASCII (16-binary) code value of the corresponding character. URL special characters need to be escaped 1, spaces replaced by plus (+) 2, forward slash (/) delimited directory and subdirectory 3, question mark (?) Separating URLs and queries 4, percent sign (%) make special characters 5, #号指定书签6, & separated parameters URL special symbol and the corresponding hexadecimal value code: 1. The + sign in the + URL represents the space%2b2. Spaces in a space URL can be%203 with a + number or code. /delimited directory and subdirectory%2f4. ? Separates the actual URL and parameter%3f5. % specifies the special character%256. # indicates bookmark%237. The delimiter%268 between the parameters specified in the & URL. = The value of the specified parameter in the URL%3d Functions for handling URL escape characters in JS escape, encodeURI, encodeuricomponentphp filter parameter special characters anti-injection PHP Methods for filtering illegal and special strings PHP Example: Special character handler example replace PHP code with special characters in extra long text |