Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"<" disappearing on iOS 16 #1275

Open
ouachman opened this issue Mar 12, 2024 · 1 comment
Open

"<" disappearing on iOS 16 #1275

ouachman opened this issue Mar 12, 2024 · 1 comment

Comments

@ouachman
Copy link

ouachman commented Mar 12, 2024

Hello,

Using NSAttributedString initWithHTMLData method with text that contains "< " (note the space after the sign) will make all the text on the right, including "< " go away.
This is only happening since iOS 16. It was working fine before.
And only happening with "< ".

As a workaround I am reverting to the iOS native (and very slowwww) transformation when the text contains "< ".

I suspect this is considered as a tag and it's looking for the corresponding ending tag.
Indeed a string like "a < b > c" will be transformed to "a c". When "ac" will stay unchanged.

Any idea how to fix this?

Thanks, Eric

@odrobnik
Copy link
Collaborator

odrobnik commented Mar 12, 2024

String replace '<' with '& lt;' before parsing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants