Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React elements nested in array/object props contain unnecessary string escaping #80

Closed
beauroberts opened this issue May 26, 2017 · 3 comments

Comments

@beauroberts
Copy link
Collaborator

Hi - thanks for an awesome tool!

I think this might be a regression but I'm not sure when it would have been introduced. I'm having issues with unnecessary string escaping on props that contain React elements with single quotes (e.g. <div object={{ nested: <div array={['hello', 'you']} /> }} />

I'll submit a pull request with a failing test but unfortunately I'm not able to investigate a fix right now. If no one else can look into it, I might get around to it in a few days:

+ expected - actual

  <div
    obj={{
-     nested: <div arr={[\'hello\', \'you\']} />
+     nested: <div arr={['hello', 'you']} />
    }}
   />
@vvo
Copy link
Contributor

vvo commented May 26, 2017

cc @shouze maybe?

@vvo
Copy link
Contributor

vvo commented May 26, 2017

might be a regression yes

beauroberts added a commit to beauroberts/react-element-to-jsx-string that referenced this issue May 26, 2017
Occurs in nested JSX that contains single quotes

Issue algolia#80
vvo pushed a commit that referenced this issue Jun 7, 2017
@vvo
Copy link
Contributor

vvo commented Jun 7, 2017

Fixed this for good, will release a new version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants