简体   繁体   中英

iPhone UITextField Apostrophe issue

There is a problem with posts in my UITextfield. Any time a word that has an apostrophe in it, it adds a backslash.

So my test post says in NSLog "I\\'m thinking there may be a problem with words that end in \\'s"

It should read: "I'm thinking there may be a problem with words that end in 's".

Sounds like escaping -- somewhere along the line, your data is being escaped. The problem isn't in the UITextField, it's in some other part of your code. Check what string is being sent to the field, you'll find that it's escaped there. Track your code back from there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM