问题描述
例如:
10 and single ' this" And " Another
在“输入”表单中,停止于:
10 and single ' this
为什么不保留双引号? “
我的表单类型确实为:enctype="application/x-www-form-urlencoded"
我还有其他带引号的表格。
解决方法
这里发生的是,文本10 and single ' this" And " Another
中的双引号引起了输入元素的破坏。
带有"
的文本将提前结束value
属性。
例如<input value="10 and single ' this" And " Another">
要克服这一点,您需要使用用户
<input value="#encodeForHTMLAttribute(formValue)#">