peternewnham / react-html-parser

Converts HTML strings directly into React components and provide a simple way to modify and replace the content.
https://peternewnham.github.io/react-html-parser
MIT License
781 stars 103 forks source link

Converts attributes to lower case #45

Open utsavk1993 opened 6 years ago

utsavk1993 commented 6 years ago

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

Can you fix this?

image

valentynminaiev commented 6 years ago

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

braco commented 5 years ago

Lowercases the tags name as well??

<FooBar> --> <foobar>

DavidLozzi commented 5 years ago

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

DavidLozzi commented 5 years ago

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

rnersesian commented 5 years ago

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...

DavidLozzi commented 5 years ago

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>' }}

george2seven commented 5 years ago

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.

jerome-diver commented 4 years ago

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 ?

naivedeveloper95 commented 3 years ago

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.

gihanrangana commented 1 year ago

is that issue fixed? still i got the lowercase issue