mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 19:06:18 +01:00 
			
		
		
		
	| @@ -314,6 +314,7 @@ export function replaceTextareaSelection(textarea: HTMLTextAreaElement, text: st | ||||
| export function createElementFromHTML<T extends HTMLElement>(htmlString: string): T { | ||||
|   htmlString = htmlString.trim(); | ||||
|   // some tags like "tr" are special, it must use a correct parent container to create | ||||
|   // eslint-disable-next-line github/unescaped-html-literal -- FIXME: maybe we need to use other approaches to create elements from HTML, e.g. using DOMParser | ||||
|   if (htmlString.startsWith('<tr')) { | ||||
|     const container = document.createElement('table'); | ||||
|     container.innerHTML = htmlString; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user