Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

stripinput does not escape specialchars

Asked Modified Viewed 887 times
M
mariusslo
M
  • Newbie, joined since
  • Contributed 3 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
asked
Newbie

Hi all,

I recently had work with a really old site that was on cp-1257 and needed to do a migration to utf-8, after that all hell broke lose, most dbqueries are not working stripinput does not escape special chars and so on. The thing is, it seems like stripinput finds the characters that needs to be replaced, but in the db query they are still not escaped. Example:

There is a POST method to get the user's input, lets say the content is:

'this here's my message', after stripinput the message should be 'this here's' my message', but it's not, it stays the original submited value with no escaping, why is this happening, in what kind of encoding hell have i've gotten my selft into?

Thanks

 
0 replies

2 posts

F
Falk
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
answered
Super Admin

Hard to say exactly, but DB should also be UTF-8 and you could prolly avoid it all by upgrading to 8 or 9. If you convert a non UTF-8 Database to UTF-8 you risk getting scrambled chars, you can fix that with this function : https://www.php-fusion.co.uk/infusions/forum/viewthread.php?thread_id=38542&pid=207196#post_202517

 
1 reply
D
douwe_yntema
D
  • Senior Member, joined since
  • Contributed 667 posts on the community forums.
  • Started 57 threads in the forums
  • Answered 1 question
answered
Senior Member

Your new database has sql_strictmode on. Turn it off.

See here https://stackoverflow.com/questions/40881773/how-to-turn-on-off-mysql-strict-mode-in-localhost-xampp

 
1 reply

Labels

None yet

Statistics

  • Views 0 views
  • Posts 2 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

F
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
D
D
  • Senior Member, joined since
  • Contributed 667 posts on the community forums.
  • Started 57 threads in the forums
  • Answered 1 question
M
M
  • Newbie, joined since
  • Contributed 3 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet