(CakePHP) 表单字段缺少内容
我正在使用 Cake1.2 并且有一个工作正常的 CMS 页面。现在好像有人粘贴了Word中的内容,其中显然有很多随机的'和"字符。经典的单词字符。
现在我的表单不会显示内容。我有pr()
'd 我的 $this->data
并且所有内容都在那里,我什至可以回显它,
因此我正在显示我的表单字段,
echo $form->input('text', array('type'=>'textarea', 'between'=>'<br />'));
它可以工作 8/10 次,但通常是。我假设这与 Word 字符不可显示有关,但我可以转义输入中的字符吗?在不扩展自定义方法的帮助器的情况下传递数据,
我想如果所有其他方法都失败,我只会编写自己的标记。
I'm using Cake1.2 and have a CMS page which was working fine. Now it seems that someone has pasted in content from Word, which has obviously got lots of random ' and " characters in. The classic word ones.
Now my form will not display the content. I have pr()
'd my $this->data
and all the content is there, hell I can even echo it out.
I am displaying my form field thus,
echo $form->input('text', array('type'=>'textarea', 'between'=>'<br />'));
It works 8/10 times, but often the field will be blank. I'm assuming it's to do with the Word characters not being displayable, but to just not populate the whole field? Can I escape the characters in the input? I've been trauling the docs looking for a way to pass data in without extending the helper for a custom method.
I guess if all else fails I'll just write my own markup.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我最后只是模拟了标记。
I just emulated the markup in the end.