mirror of
				https://github.com/Mibew/simple-icons.git
				synced 2025-11-03 20:05:13 +03:00 
			
		
		
		
	Escape icon title for object key (#2710)
This commit is contained in:
		
							parent
							
								
									6adef65a54
								
							
						
					
					
						commit
						412ccc0a6d
					
				@ -31,7 +31,8 @@ function escape(value) {
 | 
				
			|||||||
  return value.replace(/'/g, "\\'");
 | 
					  return value.replace(/'/g, "\\'");
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
function iconToKeyValue(icon) {
 | 
					function iconToKeyValue(icon) {
 | 
				
			||||||
  return `'${icon.title}':${iconToObject(icon)}`;
 | 
					  const iconTitle = escape(icon.title);
 | 
				
			||||||
 | 
					  return `'${iconTitle}':${iconToObject(icon)}`;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
function iconToObject(icon) {
 | 
					function iconToObject(icon) {
 | 
				
			||||||
  return util.format(iconObjectTemplate,
 | 
					  return util.format(iconObjectTemplate,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user