mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 03:10:07 +00:00 
			
		
		
		
	several more bugfixes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									14a0ae2c53
								
							
						
					
					
						commit
						8e53c0d840
					
				| @ -1175,12 +1175,7 @@ function getURL(id){ | |||||||
| 	for(var i=0; i<ribbons.length; i++){ | 	for(var i=0; i<ribbons.length; i++){ | ||||||
| 		var ribbon = ribbons[i] | 		var ribbon = ribbons[i] | ||||||
| 		if(ribbon[id] != null){ | 		if(ribbon[id] != null){ | ||||||
| 			// do not escape the url schema...
 | 			return ribbon[id].url | ||||||
| 			var o = /([a-zA-Z0-9]*:)(.*)/.exec(ribbon[id].url) |  | ||||||
| 			if(o.length == 3){ |  | ||||||
| 				return o[1] + escape(o[2]) |  | ||||||
| 			} |  | ||||||
| 			return escape(ribbon[id].url) |  | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| @ -1306,7 +1301,7 @@ function buildJSON(get_order){ | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| // XXX might be good to add images in packs here, not one by one...
 | // XXX might be good to add images in packs here, not one by one...
 | ||||||
| function loadJSON(data, position, set_order){ | function loadJSON(data, position, set_order, escape_urls){ | ||||||
| 	if(position == null){ | 	if(position == null){ | ||||||
| 		position = data.position | 		position = data.position | ||||||
| 	} | 	} | ||||||
| @ -1337,8 +1332,16 @@ function loadJSON(data, position, set_order){ | |||||||
| 			.appendTo(field) | 			.appendTo(field) | ||||||
| 		for(var j in images){ | 		for(var j in images){ | ||||||
| 			var image = images[j] | 			var image = images[j] | ||||||
|  | 			if(escape_urls == true){ | ||||||
|  | 				// escape the url ...
 | ||||||
|  | 				var o = /([a-zA-Z0-9]*:\/\/)(.*)/.exec(image.url) | ||||||
|  | 				if(o.length == 3){ | ||||||
|  | 					image.url = o[1] + escape(o[2]) | ||||||
|  | 				} | ||||||
|  | 				image.url = escape(image.url) | ||||||
|  | 			} | ||||||
| 			// create image...
 | 			// create image...
 | ||||||
| 			makeImage(image['url'], j, set_order) | 			makeImage(image.url, j, set_order) | ||||||
| 				.appendTo(ribbon) | 				.appendTo(ribbon) | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user