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

ignore matches between <script> tags #2

Closed
Mikaro opened this Issue May 20, 2015 · 8 comments

Comments

Projects
None yet
2 participants
@Mikaro

Mikaro commented May 20, 2015

Hi,

I need not be obfuscate if the email address is in javascript code

I have to send the email to Zopim
https://api.zopim.com/files/meshim/widget/controllers/LiveChatAPI-js.html

@wshawn

This comment has been minimized.

Show comment
Hide comment
@wshawn

wshawn May 20, 2015

Owner

Sadly, even that has to be protected, bots look for email addresses throughout the source code of a page even in JavaScript.

The purpose of the plugin is to protect all email addresses on the site without regard to the implementation.

I would have to assume your implementation is incorrect or needs changed. As I do not know anything about zopim I have asked them to get involved.

Suggestions:
You can use AJAX to fill the field and send the request.

You could also convert the hex and decimal back to text before sending the request to them. JavaScript does have those features.

After chatting with them and using the chat application, I see no reason you are having this issue if you have set up the application per their documentation.

The developers are looking into this on their end.

Owner

wshawn commented May 20, 2015

Sadly, even that has to be protected, bots look for email addresses throughout the source code of a page even in JavaScript.

The purpose of the plugin is to protect all email addresses on the site without regard to the implementation.

I would have to assume your implementation is incorrect or needs changed. As I do not know anything about zopim I have asked them to get involved.

Suggestions:
You can use AJAX to fill the field and send the request.

You could also convert the hex and decimal back to text before sending the request to them. JavaScript does have those features.

After chatting with them and using the chat application, I see no reason you are having this issue if you have set up the application per their documentation.

The developers are looking into this on their end.

@Mikaro

This comment has been minimized.

Show comment
Hide comment
@Mikaro

Mikaro May 20, 2015

Hi Shawn,

thx for reply...

this is my chunk with zopim widget ad script to pre-set user information (user information only if logged)

<script type="text/javascript">
window.$zopim||(function(d,s){var z=$zopim=function(c){z._.push(c)},$=z.s=
d.createElement(s),e=d.getElementsByTagName(s)[0];z.set=function(o){z.set.
_.push(o)};z._=[];z.set._=[];$.async=!0;$.setAttribute("charset","utf-8");
$.src="//v2.zopim.com/?xxxxxxxxxxxxxxxxxxxxxxxxxxxx";z.t=+new Date;$.
type="text/javascript";e.parentNode.insertBefore($,e)})(document,"script");
</script>
<!--End of Zopim Live Chat Script-->

<script>

[[!Profile]]
$zopim(function() {
$zopim.livechat.setName('[[+fullname]]');
$zopim.livechat.setEmail("[[+email]]");
$zopim.livechat.addTags('Subscription_Plan');
});
</script>

with ObfuscateEmail enabled the email is not set in the chat window
instead it works with the plugin disabled

I do not understand how I could solve with ajax

excuse my English

greetings

Mikaro commented May 20, 2015

Hi Shawn,

thx for reply...

this is my chunk with zopim widget ad script to pre-set user information (user information only if logged)

<script type="text/javascript">
window.$zopim||(function(d,s){var z=$zopim=function(c){z._.push(c)},$=z.s=
d.createElement(s),e=d.getElementsByTagName(s)[0];z.set=function(o){z.set.
_.push(o)};z._=[];z.set._=[];$.async=!0;$.setAttribute("charset","utf-8");
$.src="//v2.zopim.com/?xxxxxxxxxxxxxxxxxxxxxxxxxxxx";z.t=+new Date;$.
type="text/javascript";e.parentNode.insertBefore($,e)})(document,"script");
</script>
<!--End of Zopim Live Chat Script-->

<script>

[[!Profile]]
$zopim(function() {
$zopim.livechat.setName('[[+fullname]]');
$zopim.livechat.setEmail("[[+email]]");
$zopim.livechat.addTags('Subscription_Plan');
});
</script>

with ObfuscateEmail enabled the email is not set in the chat window
instead it works with the plugin disabled

I do not understand how I could solve with ajax

excuse my English

greetings

@wshawn

This comment has been minimized.

Show comment
Hide comment
@wshawn

wshawn May 20, 2015

Owner

The vendor wants you to:
*
Thank you so much for clarifying that for me. I believe the issue is with the API he has been using with the zopim script that sets the name and email of the visitor. To confirm this, you can ask him to run the widget script alone without the API and see if it's the API that's causing it.

Best Regards,
Mark Gil Maramo
Customer Advocate | Zopim Chat
*

In other words comment out your Profile call as shown with the hypens:

[[--!Profile]]
$zopim(function() {
$zopim.livechat.setName('[[+fullname]]');
$zopim.livechat.setEmail("[[+email]]");
$zopim.livechat.addTags('Subscription_Plan');
});
Owner

wshawn commented May 20, 2015

The vendor wants you to:
*
Thank you so much for clarifying that for me. I believe the issue is with the API he has been using with the zopim script that sets the name and email of the visitor. To confirm this, you can ask him to run the widget script alone without the API and see if it's the API that's causing it.

Best Regards,
Mark Gil Maramo
Customer Advocate | Zopim Chat
*

In other words comment out your Profile call as shown with the hypens:

[[--!Profile]]
$zopim(function() {
$zopim.livechat.setName('[[+fullname]]');
$zopim.livechat.setEmail("[[+email]]");
$zopim.livechat.addTags('Subscription_Plan');
});

@wshawn wshawn self-assigned this May 20, 2015

@Mikaro

This comment has been minimized.

Show comment
Hide comment
@Mikaro

Mikaro May 20, 2015

The problem is that: Zopim does not accept an email obfuscated!

$zopim.livechat.setEmail("shawn@shawnwilkerson.com");
Can't work!

I'm looking a way to prevent the plugin OfuscateEmail hides that email only

Mikaro commented May 20, 2015

The problem is that: Zopim does not accept an email obfuscated!

$zopim.livechat.setEmail("shawn@shawnwilkerson.com");
Can't work!

I'm looking a way to prevent the plugin OfuscateEmail hides that email only

@wshawn

This comment has been minimized.

Show comment
Hide comment
@wshawn

wshawn May 20, 2015

Owner

zopim is asking you to not send the email that way. Comment out the Profile call as shown above.
And let us know if that is working as it should.

Obfuscate will work on everything as it should. The Vendor is looking at how you are calling the API.

Owner

wshawn commented May 20, 2015

zopim is asking you to not send the email that way. Comment out the Profile call as shown above.
And let us know if that is working as it should.

Obfuscate will work on everything as it should. The Vendor is looking at how you are calling the API.

@wshawn

This comment has been minimized.

Show comment
Hide comment
@wshawn

wshawn May 20, 2015

Owner

Try this:

<script>
[[!Profile]]
$zopim(function() {
var email = "[[+email:replace=`@==AT`]]";
$zopim.livechat.setName('[[+fullname]]');
$zopim.livechat.setEmail(email.replace (/at/i, "@"));
$zopim.livechat.addTags('Subscription_Plan');
});
</script>

I replaced the @ symbol and put it back when the email is sent to the vendor.

Owner

wshawn commented May 20, 2015

Try this:

<script>
[[!Profile]]
$zopim(function() {
var email = "[[+email:replace=`@==AT`]]";
$zopim.livechat.setName('[[+fullname]]');
$zopim.livechat.setEmail(email.replace (/at/i, "@"));
$zopim.livechat.addTags('Subscription_Plan');
});
</script>

I replaced the @ symbol and put it back when the email is sent to the vendor.

@Mikaro

This comment has been minimized.

Show comment
Hide comment
@Mikaro

Mikaro May 22, 2015

Thx Shawn
ingenious solution!

Mikaro commented May 22, 2015

Thx Shawn
ingenious solution!

@wshawn

This comment has been minimized.

Show comment
Hide comment
@wshawn

wshawn May 23, 2015

Owner

Glad you like it.

Owner

wshawn commented May 23, 2015

Glad you like it.

@wshawn wshawn closed this May 23, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment