diff --git a/compat/src/render.js b/compat/src/render.js index 9fb379bf88..829d8db132 100644 --- a/compat/src/render.js +++ b/compat/src/render.js @@ -6,7 +6,7 @@ import { } from 'preact'; import { applyEventNormalization } from './events'; -const CAMEL_PROPS = /^(?:accent|alignment|arabic|baseline|cap|clip|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vector|vert|word|writing|x)[A-Z]/; +const CAMEL_PROPS = /^(?:accent|alignment|arabic|baseline|cap|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vector|vert|word|writing|x)[A-Z]/; // Some libraries like `react-virtualized` explicitly check for this. Component.prototype.isReactComponent = {}; diff --git a/compat/test/browser/svg.test.js b/compat/test/browser/svg.test.js index 2abf8d4f7f..45ca3666f9 100644 --- a/compat/test/browser/svg.test.js +++ b/compat/test/browser/svg.test.js @@ -66,4 +66,20 @@ describe('svg', () => { ) ); }); + + it('should render SVG to DOM without name (clipPathUnits) attribute manipulation', () => { + React.render( + + + + + , + scratch + ); + expect(serializeHtml(scratch)).to.eql( + sortAttributes( + '' + ) + ); + }); });