qb-core
qb-core copied to clipboard
FIX: Special characters in player name causes SQL error
Description
Pull request updates PlayerData.name under server/player.lua line 87, and simply parses everything but alphanumeric. This simply fixes a bug that causes a SQL error being thrown when players use steam name with special characters, such as "ꜱʜᴀᴅʏ𝘅"
Checklist
- [x ] I have personally loaded this code into an updated qbcore project and checked all of its functionality.
- [x ] My code fits the style guidelines.
- [ x] My PR fits the contribution guidelines.
This PR has had 60 days of inactivity & will close within 7 days
wouldnt;
gsub("%S","")
work better? Correct me if I'm wrong, your change gets rid of whitespace?
Not in this case, as names such as ꜱʜᴅʏ𝘅_𝘅 (odd font used) would break SQL. The gsub simply removes these