Affects Version/s: 6.0.X EE, 6.1.X EE, 6.2.X EE, 7.0.X EE, Master
Component/s: Portal Services
XMLUtil.stripInvalidChars doesn't work with surrogate pairs.
This condition will always be false, it compares 0x10000 (65536) => 17th bit and c is char with only 16bits of size.
Steps to reproduce:
1, Make sure to use HSQL DB, utf8mb4 MySQL DB or UTF-8 PostgreSQL DB
2, Create web content, into title add unicode surfer char - copy & paste from surfer.txt or from http://www.fileformat.info/info/unicode/char/1f3c4/browsertest.htm
3, Save web content and edit again
Expected result: Title still contains surfer
Actual result: Surfer is stripped