Commit Graph

152 Commits

Author SHA1 Message Date
J. Ryan Stinnett
3d1a1121b9 Restore thumbs after variation selector removal
This more thorough change adjusts emoji processing to deal with variation
selectors appropriately and revives the missing thumbs.

Regressed by https://github.com/matrix-org/matrix-react-sdk/pull/3598
Fixes https://github.com/vector-im/riot-web/issues/11344
2019-11-07 17:49:25 +00:00
David Baker
847acff894 Add some type checking on event body 2019-10-10 17:36:22 +01:00
Travis Ralston
f903f431ed Fix BigEmoji handling for permalinks
OR doesn't give us the right thing, but AND does.
2019-09-30 21:08:34 -06:00
Travis Ralston
fc66e69c02 Rename RoomPermalinkCreator -> Permalinks due to scope
The file handles more than just a RoomPermalinkCreator, so we should name it accordingly.
2019-09-30 20:39:58 -06:00
Travis Ralston
6e6f8a13e1 Handle BigEmoji permalinks better
Now that permalinks could be not-matrix.to we should be safer in what we'll allow.
2019-09-30 20:37:50 -06:00
Travis Ralston
2cb0b4903a Converge on permalink processing for HtmlUtils and linkify-matrix 2019-09-30 20:17:54 -06:00
Sorunome
fe9ae46ffb
Merge branch 'develop' of https://github.com/matrix-org/matrix-react-sdk into soru/spoilers 2019-08-28 20:23:24 +02:00
Bruno Windels
3753e5261d Implement diffing html messages in the edit history 2019-07-24 11:28:56 +02:00
J. Ryan Stinnett
2a8f9a81f7 Allow diplayed reaction values to contain anything
Part of https://github.com/vector-im/riot-web/issues/10256
2019-07-05 16:18:06 +01:00
Michael Telatynski
ecc672cccc add comment
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-07-05 08:40:00 +01:00
Michael Telatynski
d0c8e09532 delint
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-06-29 07:30:16 +01:00
Michael Telatynski
e39c3298d6 Emojibase data includes blank variations, accept these when scanning
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-06-29 07:28:09 +01:00
J. Ryan Stinnett
b5f85399a7 Rename may to might 2019-06-05 19:26:14 +01:00
J. Ryan Stinnett
5581b56cfe Restrict reactions to a single emoji
While the protocol supports more complex strings, in Riot we only want to
display single emoji.

Fixes https://github.com/vector-im/riot-web/issues/9916
2019-06-05 18:35:43 +01:00
J. Ryan Stinnett
ab4dfd8d1b Use the correct line-height for bold emoji
This avoids marking messages detected as big emoji with `markdown-body` so that
they get the correct line-height.

Fixes https://github.com/vector-im/riot-web/issues/9808
2019-05-23 10:25:45 +01:00
Sorunome
d8f4512439
add basic spoiler support 2019-05-22 20:41:27 +02:00
Matthew Hodgson
d3f06763b3
Merge branch 'develop' into matthew/twemoji 2019-05-20 16:38:44 +01:00
Matthew Hodgson
e764ba4890 remove accidental whitespace 2019-05-20 10:10:30 +01:00
Matthew Hodgson
dbc6815abf make EmojiProvider and stripped-emoji.json work 2019-05-19 20:48:18 +01:00
Matthew Hodgson
497be91c4d combine regexps correctly 2019-05-19 17:53:36 +01:00
Matthew Hodgson
9f70bf3aec fix bigemoji 2019-05-19 17:06:21 +01:00
Matthew Hodgson
54cea146e8 fix ugly formatting 2019-05-19 16:48:15 +01:00
Matthew Hodgson
a8297a7698 fix build 2019-05-19 16:11:12 +01:00
Matthew Hodgson
dc72641264 replace emojione with twemoji. completely untested & debugged & unoptimised 2019-05-19 15:23:43 +01:00
Bruno Windels
76ceee0e6c silence react warning when showing edited marker, by also giving the body a key 2019-05-17 13:31:26 +01:00
J. Ryan Stinnett
3da1f73ea4 Add a basic tooltip showing who reacted
This adds a first attempt at tooltip showing who reacted to a message. It
doesn't limit senders or position the tooltip nicely, but the info is there at
least.

Part of https://github.com/vector-im/riot-web/issues/9722
2019-05-17 12:11:01 +01:00
Andrew Morgan
8398e5dd71 Appease CI 2019-04-11 00:42:27 +01:00
Andrew Morgan
be02f67eef Switch logic 2019-04-11 00:09:38 +01:00
Andrew Morgan
52facdc0c3 Don't act on undefined attributes 2019-04-11 00:05:04 +01:00
Andrew Morgan
6a41975826 Specific check for user pills 2019-04-10 23:34:09 +01:00
Andrew Morgan
a77c3d4d9b Prevent user pills containing only emoji from embiggening 2019-04-10 18:00:04 +01:00
Andrew Morgan
79b7592dd5 Convert whitespace regex to const 2019-03-06 14:55:21 +00:00
Andrew Morgan
0516556be9 Prevent space characters from stopping big emoji messages 2019-03-05 13:07:11 +00:00
David Baker
ae16cc36aa Change SAS to decimal / emoji
Requires https://github.com/matrix-org/matrix-js-sdk/pull/837
2019-02-08 14:57:36 +00:00
Bastian
179f9a1943 Use default options from sanitizeHtmlParams for sanitizeHtml()
Signed-off-by: Bastian <matrix@noxware.de>
2019-02-07 14:33:19 +01:00
Bastian
9cd13a8893 Add HtmlUtils.linkifyString()
Add HtmlUtils.linkifyElement()

Add HtmlUtils.linkifyAndSanitize()

Refactor module imports

Signed-off-by: Bastian <matrix@noxware.de>
2019-01-31 22:26:24 +01:00
Aaron Raimist
49ce4ef117
eslint --fix src/
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2018-10-26 22:50:38 -05:00
Michael Telatynski
f5856270cc
undo removal of stripping <p>s as it breaks HTML /mes
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-18 10:48:54 +01:00
Michael Telatynski
19e5dc5799
do less rewriting for composer quote to prevent breaking pills
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-18 10:10:42 +01:00
Matthew Hodgson
021409aafe
apply review feedback from @lukebarnard1
(cherry picked from commit 37d4bce)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-09 19:54:57 +01:00
Matthew Hodgson
efdc5430d7 merge develop 2018-07-09 17:50:07 +01:00
Michael Telatynski
9ee78de7e5
pr iteration, don't assume js-sdk stores group stuff other than groupId
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-22 12:05:46 +01:00
Michael Telatynski
72f50a8c61
rewrite group permalinks in <a hrefs> also
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-19 11:51:06 +01:00
Matthew Hodgson
7de45f8b7b make quoting work 2018-05-21 03:48:59 +01:00
Matthew Hodgson
c5676eef89 comment out more old draft stuff 2018-05-20 14:32:06 +01:00
Jonas Schürmann
4a9f4ba5eb Fix vector-im/riot-web#6523 Emoji rendering destroys paragraphs
This regression was probably introduced in
4f4441fb07 and is caused by the fact that
the variable `isHtml` conflates two different meanings:

- The event contains an HTML message
- The event message is displayed using HTML

This is an important difference. Plain text messages that contain
emojies are rendered with an HTML string and thus have to be sanitized
etc. But they must not use the MarkDown CSS styles for HTML messages.

The MarkDown CSS styles include `whitespace: normal` because HTML events
use `<br/>`-tags for line breaks. Plain text messages with emojies
obviously don't use `<br/>`-tags, so these styles must not be applied.

Signed-off-by: Jonas Schürmann <jonasschuermann@aol.de>
2018-05-17 20:12:51 +02:00
Michael Telatynski
dbbcabfed8
switch from asymmetrical fallback form to a cleaner one mx-reply
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-05-12 15:58:25 +01:00
Michael Telatynski
4a0a5c6bef
Merge remote-tracking branch 'origin/t3chguy/m.relates_to' into t3chguy/m.relates_to 2018-04-27 11:23:12 +01:00
Michael Telatynski
3de679b084
Add comment to HtmlUtils.js
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-04-27 11:14:50 +01:00
Michael Telatynski
0f11bc62cc
undo code style change 2018-04-23 10:58:39 +01:00