PHP:纺织给我单引号而不是撇号
我使用的是 ClassTextile.php v2.0,调用如下:
$testimonial_text = $textile->TextileRestricted($_POST['testimonial']);
...并且我所有的撇号(例如,这里很热)都被转换为 ASCII ‘
(这是一个单引号,倾斜方向错误)。 它应该是 ASCII ’
。 我也尝试过使用 TextileThis() ,但也遇到了同样的问题。
如果我去 Textile 的网站 (http://textile.thresholdstate.com/) 尝试一下,它给出正确的 ASCII 代码。 那么为什么它不能与可下载的库一起使用呢? 或者我做错了什么?
I'm using v2.0 of ClassTextile.php, with the following call:
$testimonial_text = $textile->TextileRestricted($_POST['testimonial']);
... and all of my apostrophes (ex. It's hot in here) are being translated to ASCII ‘
(which is a single quote, which slopes the wrong way). What it should be is ASCII ’
. I've also tried using TextileThis()
and I have the same problem.
If I go and try it on Textile's website (http://textile.thresholdstate.com/), it gives the correct ASCII code. So why isn't it working with the downloadable library? Or am I doing something wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您是否真的将源代码中的文本复制粘贴到他们网站上的表单中? 如果仍然产生相同的结果,您可能应该升级您的版本。
Have you really copy-pasted the text from your source code to the form on their website? If this still yields the same result, you should probably upgrade your version.
嗯,代码看起来很干净,我建议传递 POST 和一个变量,而不是直接传递来看看是否存在某种错误。 我认为仅排除该选项结果不会改变。
Hmm code looks clean, I would suggest passing in the POST and a variable instead of directly just to see if there is some kinda bug. I don't think the results will change just ruling out that option.
再次尝试这个并且它有效。 诡异的。
不管怎样,我已经改用 Markdown 了。 呃,好吧。
Tried this again and it works. Weird.
Have since switched to Markdown, regardless. Ah well.