摘要:
今天看了JavaScript的正则表达式,之所以会记录下,是遇到了下面这个问题: 1 var searchString = "Now is the time and this is the time and that is the time"; 2 var pattern = /t\w*e/g; 3 var matchArray; 4 var str = ""; 5 matchArray = pattern.exec(searchString); 6 console.log(matchArray); 7 for(var i = 0;i... 阅读全文
摘要:
今天了解了JavaScript的转义。分别是JSON转义、HTML转义、String转义等。 主要会导致XSS漏洞,由于是内部资料,这里不分析了。 Escape sequencesPropertiesDescription\bBackspace.\fForm feed.\nNewline.\ONul character.\rCarriage return.\tHorizontal tab.\vVertical tab.\'Single quote or apostrophe.\"Double quote.\\Backslash.\dddThe Latin-1 characte 阅读全文