mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 07:24:13 +00:00 
			
		
		
		
	allow styles on any element when sanitizing html - fixes #538
this applies to instance description and server rules
This commit is contained in:
		
							parent
							
								
									42d8279610
								
							
						
					
					
						commit
						9d6504c2ec
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
					@ -13,6 +13,7 @@ export default function sanitizeHtml(str: string | null): string | null {
 | 
				
			||||||
			...original.defaults.allowedAttributes,
 | 
								...original.defaults.allowedAttributes,
 | 
				
			||||||
			a: original.defaults.allowedAttributes.a.concat(['style']),
 | 
								a: original.defaults.allowedAttributes.a.concat(['style']),
 | 
				
			||||||
			img: original.defaults.allowedAttributes.img.concat(['style']),
 | 
								img: original.defaults.allowedAttributes.img.concat(['style']),
 | 
				
			||||||
 | 
								'*': (original.defaults.allowedAttributes['*'] || []).concat(['style']),
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
	});
 | 
						});
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue