kanchan verma kanchan verma - 2 years ago 73
iOS Question

Assigning a Hebrew message to NSString sometimes shows html tags like quot&

I am working on a project which is bilingual (English and Hebrew).
While assigning Hebrew name to uilabel it is unable to display name with double quotes (") in it and instead shows quot& written with Hebrew text.

(lldb) po str
פיקסיטאפ בע"


Answer Source

Try to replace text with

 str = [[[[[str stringByReplacingOccurrencesOfString:@"&" withString:@"&" ]
    stringByReplacingOccurrencesOfString:@"""  withString:@"\""]
   stringByReplacingOccurrencesOfString:@"'"  withString:@"'" ]
  stringByReplacingOccurrencesOfString:@">"  withString:@">"]
 stringByReplacingOccurrencesOfString:@"&lt;" withString: @"<" ];
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download