Skip to content

Commit

Permalink
Makes regex more robust in html() based on review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Nate Piche committed Jan 10, 2016
1 parent 91f9e5f commit 226393c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ReactWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export default class ReactWrapper {
* @returns {String}
*/
html() {
return this.single(n => findDOMNode(n).outerHTML.replace(/\sdata-reactid[^>]+/g, ''));
return this.single(n => findDOMNode(n).outerHTML.replace(/\sdata-reactid+="[^"]+"/g, ''));
}

/**
Expand Down

0 comments on commit 226393c

Please sign in to comment.