nnhubbard / ZSSRichTextEditor

A beautiful rich text WYSIWYG editor for iOS with a syntax highlighted source view
MIT License
3.78k stars 585 forks source link

Dealing with HTML special chars #124

Closed ebetabox closed 8 years ago

ebetabox commented 8 years ago

Hi, have an issue dealing with HTML special chars / entities, not sure if is a bug or something I am missing.

When I call the "getHTML" method I do not get the special chars transformed into HTML representation (i.e ä char in this case). Is there anything I am missing?

(lldb) po [self.richTextEditor getHTML]
<b>Testäee</b>

Thanks, Emilio

ebetabox commented 8 years ago

Update: was my problem. I was using the wrong encoding on my side of the code, so this can be closed.

Leaving this here just in case someone bumps with this problem in the future: http://stackoverflow.com/questions/15956698/nsattributedstring-initwithhtml-incorrect-character-encoding