CF-Hash属性和脚本神秘地添加到mailto链接 [英] CF-Hash attribute and script mysteriously added to mailto links
问题描述
我有开发网站和制作网站:
我有 mailto电子邮件链接在底部,php源代码完全如下:
I have a mailto email link at the bottom, the php source code is exactly as follows:
<section>
<h2>Looking for a LAMP, WordPress or Drupal Developer?</h2>
<p>Contact me today: <br/>
<a href='mailto:mail@example.com'>mail@example.com</a>
<br/>
<a href='tel:+13334445555'>333 444 5555</a>
</p>
</section>
我的开发网站上的一切正常,生成的html如下:
Everything is normal on my development site, the produced html is as follows:
<section>
<h2>Looking for a LAMP, WordPress or Drupal Developer?</h2>
<p>Contact me today: <br>
<a href="mailto:mail@example.com">mail@example.com</a>
<br>
<a href="tel:+13334445555">333 444 5555</a>
</p>
</section>
然后神秘地在我的生产网站上添加了一些javascript我的mailto链接(并且只有mailto链接,在这种情况下只是一个,但我添加了更多,并且脚本也被添加到它们中)这是生产网站上的html输出:
Then mysteriously on my production site some javascript is being added my my mailto link (and only mailto links, in this case just the one but I have added more and the script is added to them as well) Here is the html output on the production site:
<section>
<h2>Looking for a LAMP, WordPress or Drupal Developer?</h2>
<p>Contact me today: <br>
<a href="mailto:mail@example.com">mail@example.com
<script cf-hash="f9e31" type="text/javascript">
/* <![CDATA[ */!function(){try{var t="currentScript"in document?document.currentScript:function() {for(var t=document.getElementsByTagName("script"),e=t.length;e--;)if(t[e].getAttribute("cf-hash"))return t[e]}();if(t&&t.previousSibling){var e,r,n,i,c=t.previousSibling,a=c.getAttribute("data-cfemail");if(a){for(e="",r=parseInt(a.substr(0,2),16),n=2;a.length-n;n+=2)i=parseInt(a.substr(n,2),16)^r,e+=String.fromCharCode(i);e=document.createTextNode(e),c.parentNode.replaceChild(e,c)}}}catch(u){}}();/* ]]> */
</script>
</a>
<br>
<a href="tel:+13334445555">333 444 5555</a>
</p>
</section>
我已检查生产服务器上的代码,此脚本不存在。
I have checked the code on my production server, this script is not there.
可能会发生什么?
推荐答案
这与ColdFusion无关。在此代码中, cf-hash
是 SCRIPT
标记(纯HTML)的属性。搜索'cf-hash =f9e31会得到很多相似的代码。找到此链接,指出它可能是CloudFlare电子邮件保护脚本。这将是您的生产服务器上运行的不在本地开发环境中的东西。
This isn't related to ColdFusion. In this code, cf-hash
is an attribute of a SCRIPT
tag (plain HTML). Searching on 'cf-hash="f9e31" gets a lot of similar code out there. Found this link that points to it possibly being a CloudFlare Email Protection script. That would be something running on your production server that's not in your local development environment.
这篇关于CF-Hash属性和脚本神秘地添加到mailto链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!