views:

41

answers:

1

I would like to do the following

[controller setMessageBody:[NSString stringWithFormat:@"<strong>%@</strong> <br> <br> %@ <br><br> %@ <br><br> Sent From MyApp",self.articleTitle, self.articleDescription, self.articleURL] 
isHTML:YES];

on the last %@ I would like to do <a href="%@">Hello</a>

But I am not sure how to escape it properly?

+1  A: 

Just use

@"....<a href=\"%%@\">Hello</a>..."

if you put it in the format, or use

@"<a href=\"%@\">Hello</a>"

if you include it using %@ in the format string. The %@ is only interpreted in the first argument of the stringWithFormat: method here.

mvds