mirror of https://github.com/vector-im/riot-web
Send HTML if there are any entities present in the composer
This is so that pasted HTML links that are represented as entities are sent as HTML.pull/21833/head
parent
55e1202c09
commit
4b96963408
|
@ -591,6 +591,14 @@ export default class MessageComposerInput extends React.Component {
|
|||
}
|
||||
});
|
||||
}
|
||||
if (!shouldSendHTML) {
|
||||
const hasAnEntity = blocks.some((block) => {
|
||||
return block.getCharacterList().filter((c) => {
|
||||
return c.getEntity();
|
||||
}).size > 0;
|
||||
});
|
||||
shouldSendHTML = hasAnEntity;
|
||||
}
|
||||
if (shouldSendHTML) {
|
||||
contentHTML = HtmlUtils.processHtmlForSending(
|
||||
RichText.contentStateToHTML(contentState),
|
||||
|
|
Loading…
Reference in New Issue