如何解決ecshop注冊的用戶名是亂碼
ecshop注冊的用戶名是亂碼,問題出在ECSHOP在把資料放進(jìn)數(shù)據(jù)庫時(shí), 經(jīng)過了htmlentities的處理, 防止javascriptr的惡意輸入,
文件位于/includes/lib_passport.php第165行:
原代碼: $other[$key] = htmlentities($val); //防止用戶輸入javascript代碼
只要把htmlentities換成htmlspecialchars就OK 了
$other[$key] = htmlspecialchars($val); //防止用戶輸入javascript代碼
另一個(gè)文件位于/includes/lib_transaction.php第85行:
原代碼: $profile['other'][$key] = htmlentities($val); //防止用戶輸入javascript代碼
修改后的代碼為:
$profile['other'][$key] = htmlspecialchars($val); //防止用戶輸入javascript代碼