mirror of
				https://gitlab.com/ruany/litebans-php.git
				synced 2025-10-29 22:12:25 +00:00 
			
		
		
		
	Fix '&' replacement
This commit is contained in:
		
							parent
							
								
									755cb4c221
								
							
						
					
					
						commit
						6bdd5bda5f
					
				| @ -42,11 +42,11 @@ function millis_to_date($millis) { | |||||||
|  * @param $text |  * @param $text | ||||||
|  */ |  */ | ||||||
| function clean($text) { | function clean($text) { | ||||||
|     $text = htmlspecialchars($text, ENT_QUOTES, 'UTF-8'); |  | ||||||
|     if (strstr($text, "\xa7") || strstr($text, "&")) { |     if (strstr($text, "\xa7") || strstr($text, "&")) { | ||||||
|         $regex = "/(?i)(\xa7|&)[0-9A-FK-OR]/"; |         $regex = "/(?i)(\xa7|&)[0-9A-FK-OR]/"; | ||||||
|         $text = preg_replace($regex, "", $text); |         $text = preg_replace($regex, "", $text); | ||||||
|     } |     } | ||||||
|  |     $text = htmlspecialchars($text, ENT_QUOTES, 'UTF-8'); | ||||||
|     if (strstr($text, "\n")) { |     if (strstr($text, "\n")) { | ||||||
|         $text = preg_replace("/\n/", "<br>", $text); |         $text = preg_replace("/\n/", "<br>", $text); | ||||||
|     } |     } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Ruan
						Ruan