Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions src/browser/ui/dom/DOMPropertyOperations.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ var DOMProperty = require('DOMProperty');

var escapeTextContentForBrowser = require('escapeTextContentForBrowser');
var quoteAttributeValueForBrowser = require('quoteAttributeValueForBrowser');
var memoizeStringOnly = require('memoizeStringOnly');
var warning = require('warning');

function shouldIgnoreValue(name, value) {
Expand All @@ -27,10 +26,6 @@ function shouldIgnoreValue(name, value) {
(DOMProperty.hasOverloadedBooleanValue[name] && value === false);
}

var processAttributeNameAndPrefix = memoizeStringOnly(function(name) {
return escapeTextContentForBrowser(name) + '=';
});

if (__DEV__) {
var reactProps = {
children: true,
Expand Down Expand Up @@ -82,7 +77,7 @@ var DOMPropertyOperations = {
* @return {string} Markup string.
*/
createMarkupForID: function(id) {
return processAttributeNameAndPrefix(DOMProperty.ID_ATTRIBUTE_NAME) +
return DOMProperty.ID_ATTRIBUTE_NAME + '=' +
quoteAttributeValueForBrowser(id);
},

Expand All @@ -102,16 +97,14 @@ var DOMPropertyOperations = {
var attributeName = DOMProperty.getAttributeName[name];
if (DOMProperty.hasBooleanValue[name] ||
(DOMProperty.hasOverloadedBooleanValue[name] && value === true)) {
return escapeTextContentForBrowser(attributeName);
return attributeName;
}
return processAttributeNameAndPrefix(attributeName) +
quoteAttributeValueForBrowser(value);
return attributeName + '=' + quoteAttributeValueForBrowser(value);
} else if (DOMProperty.isCustomAttribute(name)) {
if (value == null) {
return '';
}
return processAttributeNameAndPrefix(name) +
quoteAttributeValueForBrowser(value);
return name + '=' + quoteAttributeValueForBrowser(value);
} else if (__DEV__) {
warnUnknownProperty(name);
}
Expand Down