Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

Replace MXKTools's sanitiseHTML with DTCoreText's will flush callback. #954

Merged
merged 4 commits into from
Nov 29, 2021

Conversation

pixlwave
Copy link
Member

@pixlwave pixlwave commented Nov 18, 2021

Fixes element-hq/element-ios#5165.

The block supplied as the DTWillFlushBlockCallBack option gets called just before the html builder converts the element into an attributed string. This PR modifies the DTHTMLElement whenever a tag is found that isn't part of the allowedHTMLTags array.

Instead of removing h1/h2 tags, they are now simply formatted similarly to h3 tags using the CSS option.

The image handler isn't used in MatrixKit, but instead is used in Element.

@pixlwave pixlwave merged commit e9c616e into develop Nov 29, 2021
@pixlwave pixlwave deleted the doug/5165_use_dtcoretext_callback branch November 29, 2021 15:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use DTCoreText's callback option to sanitise formatted messages
2 participants