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

Use DTCoreText's callback option to sanitise formatted messages #5165

Closed
pixlwave opened this issue Nov 18, 2021 · 0 comments · Fixed by matrix-org/matrix-ios-kit#954 or #5166
Closed
Labels
A-Timeline T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements

Comments

@pixlwave
Copy link
Member

pixlwave commented Nov 18, 2021

Currently we sanitise the HTML of formatted messages in MXKTools before passing the string to DTCoreText to generate an attributed string. The main purpose of this call is to remove h1/h2 tags to prevent shouting, but it also allows for images to be downloaded locally to allow for attachment to the attributed string.

This can all be done with DTCoreText's DTWillFlushBlockCallBack option.

@pixlwave pixlwave added T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements A-Timeline labels Nov 18, 2021
@pixlwave pixlwave changed the title Use DTCoreText's callback feature to sanitise formatted messages Use DTCoreText's callback option to sanitise formatted messages Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Timeline T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements
Projects
None yet
1 participant