今天了解了JavaScript的转义。分别是JSON转义、HTML转义、String转义等。
主要会导致XSS漏洞,由于是内部资料,这里不分析了。
Escape sequences
Properties | Description |
---|---|
\b | Backspace. |
\f | Form feed. |
\n | Newline. |
\O | Nul character. |
\r | Carriage return. |
\t | Horizontal tab. |
\v | Vertical tab. |
\' | Single quote or apostrophe. |
\" | Double quote. |
\\ | Backslash. |
\ddd | The Latin-1 character specified by the three octal digits between 0 and 377. ie, copyright symbol is \251. |
\xdd | The Latin-1 character specified by the two hexadecimal digits dd between 00 and FF. ie, copyright symbol is \xA9. |
\udddd | The Unicode character specified by the four hexadecimal digits dddd. ie, copyright symbol is \u00A9. |