You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					15 lines
				
				328 B
			
		
		
			
		
	
	
					15 lines
				
				328 B
			| 
								 
											3 years ago
										 
									 | 
							
								<!doctype html>
							 | 
						||
| 
								 | 
							
								<html>
							 | 
						||
| 
								 | 
							
								<head>
							 | 
						||
| 
								 | 
							
								  <title>测试</title>
							 | 
						||
| 
								 | 
							
								  <meta charset="utf8">
							 | 
						||
| 
								 | 
							
								</head>
							 | 
						||
| 
								 | 
							
								<body>
							 | 
						||
| 
								 | 
							
								  <pre id="result"></pre>
							 | 
						||
| 
								 | 
							
								</body>
							 | 
						||
| 
								 | 
							
								</html>
							 | 
						||
| 
								 | 
							
								<script src="xss.js"></script>
							 | 
						||
| 
								 | 
							
								<script>
							 | 
						||
| 
								 | 
							
								var code = '<script>alert("xss");</' + 'script>';
							 | 
						||
| 
								 | 
							
								document.querySelector('#result').innerText = code + '\n被转换成了\n' + filterXSS(code);
							 | 
						||
| 
								 | 
							
								</script>
							 |