react-html-parser icon indicating copy to clipboard operation
react-html-parser copied to clipboard

Converts attributes to lower case

Open utsavk1993 opened this issue 6 years ago • 10 comments

If I bind onChange on input tag, it converts to lowercase and ReactJS gives a warning.

Can you fix this?

image

utsavk1993 avatar May 24 '18 00:05 utsavk1993

I have a same issue with inline styles My background-image url contains lowercase and uppercase symbols. Rendered styles contain only lowercase symbols.

valentynminaiev avatar May 25 '18 09:05 valentynminaiev

Lowercases the tags name as well??

<FooBar> --> <foobar>

braco avatar Dec 11 '18 14:12 braco

and my <svg viewbox should be viewBox, thus my SVGs aren't working....

DavidLozzi avatar Feb 13 '19 18:02 DavidLozzi

I threw a workaround over in https://github.com/wrakky/react-html-parser/issues/56

DavidLozzi avatar Feb 14 '19 17:02 DavidLozzi

and my <svg viewbox should be viewBox, thus my SVGs aren't working....

Same here, what I did is adding an attribute viewBox with viewbox's value. If someone has a better a solution...

rnersesian avatar Jul 15 '19 12:07 rnersesian

I ended up skipping this library altogether, there were too many issues with the SVG, and just setting the content like: dangerouslySetInnerHTML={{ __html: '<svg>...</svg>' }}

DavidLozzi avatar Jul 16 '19 15:07 DavidLozzi

I've used svg-to-jsx library to convert first to jsx and then run it by this one. All of the properties are read correctly except "preserveaspectratio" which is reverted back to lowercase.

george2seven avatar Jul 23 '19 12:07 george2seven

Same for "textarea" tag name, it does hit up a warning to use "defaultValue" attribute, but impossible to get "defaultValue", instead it is "defaultvalue" after parsed. critical error from two years ago already.

Do someone know an other html parser library still maintained and not to much bugged ?

jerome-diver avatar Jul 26 '20 15:07 jerome-diver

I have the same issue with inline styles My background-image URL contains lowercase and uppercase symbols. Rendered styles contain only lowercase symbols.

Did you issue get fixed? I am facing the same issue now.

naivedeveloper95 avatar Sep 28 '20 10:09 naivedeveloper95

is that issue fixed? still i got the lowercase issue

gihanrangana avatar Jan 04 '23 09:01 gihanrangana