jquery - 在没有 SSL 的情况下将 Wufoo 链接到外部样式表

标签 jquery css forms ssl wufoo

我将 Wufoo 与存储在我的服务器上的外部样式表一起使用(只是 http://,而不是 https://)。

但是,因为使用 Wufoo 生成的默认短代码设置为 SSL = 'true' 就像这样...... [wufoo username="xxx"formhash="xxx"autoresize="true"height="765"header="show"ssl="true"] 某些浏览器会抛出一个错误,指出正在加载不安全的内容,例如Chrome 和 IE9。此问题已在此处报告 - http://wufoo.com/forums/discussion/3815/theme-advanced-your-css-file-on-the-web-big-issue-with-ie9-browser/p1

我的问题是 - 有没有一种方法可以默认关闭 Wufoo SSL,以便访问者不会收到此错误?我对 SSL 部分并不是特别在意——它不是那么 secret 。或者,我可以使用 jQuery 将源代码中的 SSL='true' 更改为 SSL='false' 吗?

附注我知道我可以手动修改嵌入代码以关闭 SSL(根据此文档 http://www.wufoo.com/docs/url-modifications/#format )但这是不可能的,临时用户每天都会嵌入表单。

最佳答案

对于遇到此问题的任何人,我所做的是替换 PHP 中的 SSL 字符串(因为我使用的是 WordPress)。

这可能不是最好的解决方案,因为我要删除 SSL,但由于数据不是非常 secret ,我可以接受它。

<!-- Get Custom Field data (or content, etc.). In this case the custom field is called 'true'-->
<?php $ID = $post_id['ID']; ?>
<?php $custom = get_post_meta($post->ID, 'test', true); ?>              

<!-- Strip out SSL because it causes loading issues in IE9 and Chrome (since it is loading the stylesheet from a non-secure address). -->
<?php $withoutssl = str_replace('ssl="true"','ssl="false"', $custom); ?>

<!-- Apply formatting. -->
<?php $formatted = apply_filters('the_content', $withoutssl); ?>

<!-- Output the Custom Field. -->
<?php echo $formatted ?>

关于jquery - 在没有 SSL 的情况下将 Wufoo 链接到外部样式表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9116193/

相关文章:

jquery - Phonegap,jQuery ajax 帖子不起作用

javascript - jquery中的动画效果无法正常工作

jquery - Ajax 将列表作为字符串发送,而不仅仅是列表

javascript - jQuery 悬停图像的特定区域

html - 如何在表单外制作单选按钮?

jquery - 如果 :contains() match the text using jQuery 在段落中间添加 <span> 标记

css - 我正在创建一个使用 python 创建 PDF(比如从 html 到 PDF)的服务。

html - 即使我使用 url ('../../images/image.png' 背景图像路径也不起作用)

python - Django:我的表单没有持久保存在数据库中

forms - 应用程序/x-www-form-urlencoded 和字符集 ="utf-8"?