2009-12-29 155 views
1

我正在使用的系統有一個處理'的bug,是否有'的html格式?有沒有像''的東西?

有沒有PHP函數來查找這個?

+0

你想接受的答案。如果他們滿足.. – 2009-12-29 08:32:42

+0

你確定你的系統有報價的錯誤,它不只是一個編程錯誤?它是你的服務器還是客戶端的錯誤? – 2009-12-29 08:35:49

+0

@Mark Byers,在我的客戶端。 – user198729 2009-12-29 08:37:39

回答

4
htmlentities ($string, ENT_QUOTES); 
2

試試這個:

' 

看到它在行動(不太多看):'

9

'

看看在HTML page on these codes.

+0

這是否有PHP函數? – user198729 2009-12-29 08:27:20

+1

我不這麼認爲,谷歌發現這個:http://matthewjamestaylor.com/blog/convert-special-characters-to-html-entities-between-code-tags – monksy 2009-12-29 08:29:03

1

您也可以使用'

1
Character Entity Number  Entity Name   Description 

    "   "    "   quotation mark 

    '   '    '   apostrophe(does not work in IE) 

    &   &    &   ampersand 

    <   &#60;    &lt;   less-than 

    >   &#62;    &gt;   greater-than 
+0

請注意,它只是',不被廣泛​​支持。 – Ms2ger 2009-12-29 10:23:53

+0

我已經提到它在大括號..它不支持IE .. – 2009-12-29 13:17:00