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

SVG as child element does not work #35

Closed
snc opened this issue Mar 22, 2019 · 3 comments
Closed

SVG as child element does not work #35

snc opened this issue Mar 22, 2019 · 3 comments

Comments

@snc
Copy link

snc commented Mar 22, 2019

I want to use an inline SVG letter icon as child inside <Obfuscate>, but this unfortunately does not work.

<Obfuscate email={'user@localhost'}>
  <svg viewBox="0 0 24 24">
    <!-- ... -->
  </svg>
</Obfuscate>

It fails when calling this.reverse(propsList) here https://github.com/coston/react-obfuscate/blob/master/src/obfuscate.js#L99.

Are there plans to support this?

coston pushed a commit that referenced this issue Mar 23, 2019
coston pushed a commit that referenced this issue Mar 23, 2019
@coston
Copy link
Owner

coston commented Mar 23, 2019

Hi @snc! Thank you for opening this issue. It makes a lot of sense to have this functionality. I made a quick change to allow for objects to pass without being reversed. Please let me know what you think about the changes at: 14430a5

You can npm i react-obfuscate@next to test.
The branch demonstrates a child svg at: https://deploy-preview-36--react-obfuscate.netlify.com

coston pushed a commit that referenced this issue Mar 24, 2019
coston added a commit that referenced this issue Mar 25, 2019
…rsed-#35

Allow child objects to pass unreversed #35
@coston
Copy link
Owner

coston commented Mar 25, 2019

This feature has been merged 3bc6bce

npm i react-obfuscate@3.3.1

@coston coston closed this as completed Mar 25, 2019
@snc
Copy link
Author

snc commented Mar 25, 2019

Works like a charm, thanks for implementing this!

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