![]() |
Converting Special Chars from HTML to UTF-8 ascii standard?
Hey there,
I'm using the AddonChat Integration Script and have been working with Chris Duerr, the author, to try and solve this problem: users that have special characters (such as accents, as in ? ? ? ? ?) are getting an invalid username/password notice. This is because vBulletin stores these special characters as HTML escape equivalents. How can we convert the HTML escape characters to UTF-8 standard ascii characters? Here is the code cited from the integration script: Code:
<?php Code:
$username = html_entity_decode($username); |
There is a function in vb called unhtmlspecialchars()
From the documentation ; Code:
Returns a string where HTML entities have been converted back to their original characters |
Thanks, Paul! However, that didn't seem to work. I added:
Code:
$username = unhtmlspecialchars($username); |
Latest information from Chris Duerr, the original hack author:
Quote:
|
I didn't really read your code, you asked about decoding, which was what I answered.
Looking at your code then yes, you need to do the opposite, you want to code your username to match vb. The vb function is htmlspecialchars_uni(), but I believe vb does more than just that. |
Thanks, Paul. I gave that a shot, but strangely, still no luck. Specifically, I used:
$username = htmlspecialchars_uni($username); $password = htmlspecialchars_uni($password); ... and I still got invalid returns from the system. Then looking further, I also saw that the chat_auth.php code provided by Chris Duerr had already apparently done this analysis: Code:
# Fetch User Info from Database.. |
You need to look in the user datamanager to see what other conversions vb does.
|
Quote:
|
class_dm_user.php in the includes folder.
|
Kaelon -- Just curious if we ever found a solution to this? I'm working on the 3.7 mod now, and would like to find a solution that doesn't require a non-standard php library.
|
All times are GMT. The time now is 07:11 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|