2012-02-02 96 views
1

我在存储在服务器上的外部样式表中使用了Wufoo(只是http://,而不是https://)。将Wufoo链接到没有SSL的外部样式表中

但是,因为使用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'?

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

回答

1

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

这可能不是最好的解决方案,因为我正在移除SSL,但由于数据不是非常保密,我可以忍受它。

<!-- 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 ?>