HTML entity encoding (convert '<' to '<') on iPhone in objective-c

后端 未结 6 1312
忘了有多久
忘了有多久 2020-12-09 11:19

I\'m developing an application for the iPhone that has inApp-mail sending capabilities. So far so good, but now I want to avoid html-injections as some parts of the mail are

6条回答
  •  难免孤独
    2020-12-09 12:10

    Assuming the character encoding of the email supports Unicode - say UTF-8 - could you not just find and replace the occurrences of <, >, and & with <, >, and &?

提交回复
热议问题