Web user behavior: Difference between revisions
Jump to navigation
Jump to search
m
→使用者操作/使用者輸入的內容
m (→使用者操作/使用者輸入的內容) |
|||
| Line 15: | Line 15: | ||
** jQuery: [http://api.jquery.com/jQuery.trim/ $.trim('string')] | ** jQuery: [http://api.jquery.com/jQuery.trim/ $.trim('string')] | ||
* | * 包含 ASCII 特殊符號 ex: 單引號 ', 雙引號 ", 反斜線 \, 大於小於符號 > < | ||
** 對策: [http://www.php.net/manual/en/function.htmlentities.php PHP: htmlentities - Manual] {{kbd | key=<nowiki>echo htmlentities($str, ENT_QUOTES, "UTF-8");</nowiki>}} | ** 對策: [http://www.php.net/manual/en/function.htmlentities.php PHP: htmlentities - Manual] {{kbd | key=<nowiki>echo htmlentities($str, ENT_QUOTES, "UTF-8");</nowiki>}} | ||
** [[Export MySQL query to Excel file]]: [https://errerrors.blogspot.com/2016/02/navicat.html 解決 Navicat 「存放裝置空間不足,無法完成此操作」問題訊息] 「如果欄位內容是以等號 (=) 、加號 (+)、減號 (-) 或 @ 符號開頭,都會被 (Excel) 視作公式。」而造成錯誤 | ** [[Export MySQL query to Excel file]]: [https://errerrors.blogspot.com/2016/02/navicat.html 解決 Navicat 「存放裝置空間不足,無法完成此操作」問題訊息] 「如果欄位內容是以等號 (=) 、加號 (+)、減號 (-) 或 @ 符號開頭,都會被 (Excel) 視作公式。」而造成錯誤 | ||
** (如果允許輸入多行文字) 包含[[Return symbol | 換行符號]] e.g. {{kbd | key=<nowiki>\r\n</nowiki>}} on {{Win}}, {{kbd | key=<nowiki>\r</nowiki>}} on {{Mac}} & {{kbd | key=<nowiki>\n</nowiki>}} on {{Linux}}<ref>[https://social.msdn.microsoft.com/Forums/zh-TW/47af2197-26b4-4b9e-90e8-bfa9d5cd05b4/what-is-the-deference-between-r-n-and-rn-?forum=csharplanguage What is the deference between What is the deference between \r, \n and \r\n ?!]</ref> | ** (如果允許輸入多行文字) 包含[[Return symbol | 換行符號]] e.g. {{kbd | key=<nowiki>\r\n</nowiki>}} on {{Win}}, {{kbd | key=<nowiki>\r</nowiki>}} on {{Mac}} & {{kbd | key=<nowiki>\n</nowiki>}} on {{Linux}}<ref>[https://social.msdn.microsoft.com/Forums/zh-TW/47af2197-26b4-4b9e-90e8-bfa9d5cd05b4/what-is-the-deference-between-r-n-and-rn-?forum=csharplanguage What is the deference between What is the deference between \r, \n and \r\n ?!]</ref> | ||
** 可能包含 [[Byte order mark| Byte order mark (BOM)]] | ** 可能包含 [[Byte order mark| Byte order mark (BOM)]] | ||
* | |||
** | * 混合包含 Unicode 和 ASCII 符號 | ||
** [https://zh.wikipedia.org/zh-tw/%E7%B9%AA%E6%96%87%E5%AD%97 表情圖示] ([[Emoji]]):由 Unicode 符號組成 <ref>[https://stackoverflow.com/questions/39463134/how-to-store-emoji-character-in-mysql-database How to store Emoji Character in MySQL Database - Stack Overflow]</ref> | |||
** 表情符號 ([https://en.wikipedia.org/wiki/Emoticon Emoticon]) 符號,例如 {{kbd | key=<nowiki>゚д゚</nowiki>}}:由 Unicode 或 ASCII 符號組成 | |||
* htmlentities<ref>[https://dev.w3.org/html5/html-author/charref Character Entity Reference Chart]</ref> | |||
* htmlentities<ref>[https://dev.w3.org/html5/html-author/charref Character Entity Reference Chart]</ref> | * htmlentities<ref>[https://dev.w3.org/html5/html-author/charref Character Entity Reference Chart]</ref> | ||