We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe90e73 commit 3b14406Copy full SHA for 3b14406
src/htmltojsx.js
@@ -38,7 +38,6 @@ var ELEMENT_ATTRIBUTE_MAPPING = {
38
// Reference: https://developer.mozilla.org/en-US/docs/Web/SVG/Element#SVG_elements
39
var ELEMENT_TAG_NAME_MAPPING = {
40
a: 'a',
41
- alt: 'alt',
42
altglyph: 'altGlyph',
43
altglyphdef: 'altGlyphDef',
44
altglyphitem: 'altGlyphItem',
@@ -628,6 +627,8 @@ HTMLtoJSX.prototype = {
628
627
result += '={' + attribute.value + '}';
629
} else if (attribute.value.length > 0) {
630
result += '="' + attribute.value.replace(/"/gm, '"') + '"';
+ } else if(attribute.value.length === 0 && attribute.name === 'alt') {
631
+ result += '=""';
632
}
633
return result;
634
0 commit comments