mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-04 12:14:12 +00:00 
			
		
		
		
	Made URLs detection more efficient
This commit is contained in:
		@@ -63,10 +63,10 @@ ComunicWeb.components.textParser = {
 | 
			
		||||
	_prepare_url_tag_parsing: function(target){
 | 
			
		||||
 | 
			
		||||
		//Find all occurences of users tag
 | 
			
		||||
		while(target.innerHTML.match(/ [a-zA-Z]{2,5}:\/\/[a-zA-Z0-9.=@\?\&:\/]+/i)){
 | 
			
		||||
		while(target.innerHTML.match(/ [a-zA-Z]{2,5}:\/\/[a-zA-Z0-9.=@\?\-\_\&\;:\/]+/i)){
 | 
			
		||||
 | 
			
		||||
			//Get URL and save it
 | 
			
		||||
			var URL = target.innerHTML.match(/ [a-zA-Z]{2,5}:\/\/[a-zA-Z0-9.=@\?\&:\/]+/i)[0];
 | 
			
		||||
			var URL = target.innerHTML.match(/ [a-zA-Z]{2,5}:\/\/[a-zA-Z0-9.=@\?\-\_\&\;:\/]+/i)[0];
 | 
			
		||||
			tempURL = URL.replace("://", ":/");
 | 
			
		||||
			target.innerHTML = target.innerHTML.replace(URL, "<innerURL>"+tempURL+"</innerURL>");
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user