diff --git a/plugins/techdocs/src/reader/transformers/html/transformer.sanitizer.test.tsx b/plugins/techdocs/src/reader/transformers/html/transformer.sanitizer.test.tsx index a26757764c..ea609e04f8 100644 --- a/plugins/techdocs/src/reader/transformers/html/transformer.sanitizer.test.tsx +++ b/plugins/techdocs/src/reader/transformers/html/transformer.sanitizer.test.tsx @@ -99,4 +99,25 @@ describe('Transformers > Html > Sanitizer Custom Elements', () => { expect(elements[1].hasAttribute('attribute3')).toEqual(false); expect(elements[1].hasAttribute('attribute4')).toEqual(false); }); + + it('should retain the dominant baseline attribute for svgs', async () => { + const { result } = renderHook(() => useSanitizerTransformer(), { wrapper }); + + const dirtyDom = document.createElement('html'); + dirtyDom.innerHTML = ` +
+ + + + `; + const clearDom = await result.current(dirtyDom); + + const elements = Array.from(clearDom.querySelectorAll