gpraveenonline / simple-linkedinphp

Automatically exported from code.google.com/p/simple-linkedinphp
0 stars 0 forks source link

Comment length problem in non-Latin languages #44

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Post any lengthy comment in any non-Latin language and you'll eventually get 
"comment is too long" error message. This happens, because length is determined 
with strlen(). however it should be mb_strlen().

But that's not enough, because some lines like this one don't contain substr() 
function, which is pretty necessary:

$comment = 
htmlspecialchars(trim(strip_tags(stripslashes($content['comment']))));

If htmlspecialchars() converts some characters, then 700 char message will get 
extra chars and you'll get the same error.

Original issue reported on code.google.com by provitil...@gmail.com on 13 Mar 2013 at 8:28