首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >将Wufoo链接到不带SSL的外部样式表

将Wufoo链接到不带SSL的外部样式表
EN

Stack Overflow用户
提问于 2012-02-03 00:41:59
回答 1查看 1.9K关注 0票数 1

我正在使用带有存储在我的服务器上的外部样式表的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部分-它并不是那么机密。或者,我可以使用jQuery在源代码中将SSL='true‘更改为SSL='false’吗?

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

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-02-03 22:13:11

对于任何在这个问题上苦苦挣扎的人来说,我所做的就是替换PHP中的SSL字符串(因为我使用的是WordPress)。

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

代码语言:javascript
复制
<!-- 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 ?>
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9116193

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档