-1

I want to create a NSString that contains some HTML-Code. But as the HTML code contains a " the string ends too early.

This is the HTML code I want to add.

<FONT FACE="arial">arial font</FONT>

This is how I do it:

NSString *myHTMLcode = @"<FONT FACE="arial">arial font</FONT>"

As you can see, it stops too early (before the arial) What do I have to do in order to get a NSString that contains a "?

Thank you very much!

lukas
  • 2,300
  • 6
  • 28
  • 41

1 Answers1

2

Use the standard (Objective-)C(++) escape character:

@"A string with a quote \", a tab \t, a new line \n, and a backslash \\";
CRD
  • 52,522
  • 5
  • 70
  • 86