html-react-parser 3.0.6 → 3.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -531,7 +531,7 @@ npx size-limit
531
531
 
532
532
  ### Code Contributors
533
533
 
534
- This project exists thanks to all the people who contribute. [[Contribute](https://github.com/remarkablemark/html-react-parser/blob/master/CONTRIBUTING.md)].
534
+ This project exists thanks to all the people who contribute. [[Contribute](https://github.com/remarkablemark/html-react-parser/blob/master/.github/CONTRIBUTING.md)].
535
535
 
536
536
  [![Code Contributors](https://opencollective.com/html-react-parser/contributors.svg?width=890&button=false)](https://github.com/remarkablemark/html-react-parser/graphs/contributors)
537
537
 
@@ -2415,9 +2415,10 @@
2415
2415
  * Converts HTML/SVG DOM attributes to React props.
2416
2416
  *
2417
2417
  * @param {object} [attributes={}] - HTML/SVG DOM attributes.
2418
+ * @param {string} [nodeName] - DOM node name.
2418
2419
  * @returns - React props.
2419
2420
  */
2420
- var attributesToProps$2 = function attributesToProps(attributes) {
2421
+ var attributesToProps$2 = function attributesToProps(attributes, nodeName) {
2421
2422
  attributes = attributes || {};
2422
2423
 
2423
2424
  var valueOnlyInputs = {
@@ -2453,6 +2454,7 @@
2453
2454
  // https://reactjs.org/docs/uncontrolled-components.html
2454
2455
  if (
2455
2456
  (propName === 'checked' || propName === 'value') &&
2457
+ nodeName !== 'option' &&
2456
2458
  !inputIsValueOnly
2457
2459
  ) {
2458
2460
  propName = getPropName('default' + attributeNameLowerCased);
@@ -2573,7 +2575,7 @@
2573
2575
  if (skipAttributesToProps(node)) {
2574
2576
  setStyleProp(props.style, props);
2575
2577
  } else if (props) {
2576
- props = attributesToProps$1(props);
2578
+ props = attributesToProps$1(props, node.name);
2577
2579
  }
2578
2580
 
2579
2581
  children = null;