【发布时间】:2015-10-18 15:47:04
【问题描述】:
我正在使用bootstrap-wysihtml5 编辑器。在我的网络上,它运行良好。但是当我使用 jquery 将数据从它发送到 php 时,它会发送一些额外的数据。例如:
当我发送这个时:
product two
它发送以下内容:
product+two%3Cbr%3E
我的 Bootstrap wysihtml5 配置在这里:
$('#form').wysihtml5({
image: false
});
我的 jquery ajax 代码在这里:
$.ajax({
url: "index.php",
type: 'POST',
dataType: 'html',
data: {
contentEdit: $('#form').serialize()
},
success: function(data) {
alert('something ...');
}
});
避免这种情况的程序是什么?
【问题讨论】:
-
嗨,我想知道这个。
-
看起来它只是对数据进行 url 编码。您可能需要在服务器上对其进行 url 解码。
标签: javascript php jquery regex bootstrap-wysiwyg