Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
a7deb202
Commit
a7deb202
authored
Apr 28, 2020
by
Christoph Scholz
Committed by
JC Brand
Apr 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make use_system_emojis==false work
parent
5546085f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
9 deletions
+4
-9
CHANGES.md
CHANGES.md
+1
-0
src/templates/emoji_picker.js
src/templates/emoji_picker.js
+3
-9
No files found.
CHANGES.md
View file @
a7deb202
...
...
@@ -22,6 +22,7 @@ Soon we'll deprecate the latter, so prepare now.
-
#1937: Editing a message removes the mentions highlight
-
#1963: Mentions are visually incorrect when used in message replies
-
#2002: fix rendering of
`muc_roomid_policy_hint`
-
#2006: fix rendering of emojis in case
`use_system_emojis == false`
-
Allow ignoring of bootstrap modules at build using environment variable. For xample:
`export BOOTSTRAP_IGNORE_MODULES="Modal,Dropdown" && make dist`
-
Bugfix. Handle stanza that clears the MUC subject
-
Replace Backbone with
[
Skeletor
](
https://github.com/skeletorjs/skeletor
)
...
...
src/templates/emoji_picker.js
View file @
a7deb202
...
...
@@ -10,7 +10,7 @@ const skintones = ['tone1', 'tone2', 'tone3', 'tone4', 'tone5'];
const
emoji_category
=
(
o
)
=>
{
const
category_emoji
=
unsafeHTML
(
xss
.
filterXSS
(
o
.
transformCategory
(
o
.
emoji_categories
[
o
.
category
]),
{
'
whiteList
'
:
{
'
img
'
:
[]}}));
const
category_emoji
=
unsafeHTML
(
xss
.
filterXSS
(
o
.
transformCategory
(
o
.
emoji_categories
[
o
.
category
]),
{
'
whiteList
'
:
{
'
img
'
:
[
'
class
'
,
'
draggable
'
,
'
alt
'
,
'
src
'
,
'
title
'
]}}));
return
html
`
<li data-category="
${
o
.
category
}
"
class="emoji-category
${
o
.
category
}
${(
o
.
current_category
===
o
.
category
)
?
'
picked
'
:
''
}
"
...
...
@@ -32,10 +32,7 @@ const emoji_picker_header = (o) => html`
const
emoji_item
=
(
o
)
=>
{
let
emoji
;
if
(
o
.
_converse
.
api
.
settings
.
get
(
'
use_system_emojis
'
))
{
emoji
=
unsafeHTML
(
xss
.
filterXSS
(
o
.
transform
(
o
.
emoji
.
sn
),
{
'
whiteList
'
:
{
'
img
'
:
[]}}));
}
const
emoji
=
unsafeHTML
(
xss
.
filterXSS
(
o
.
transform
(
o
.
emoji
.
sn
),
{
'
whiteList
'
:
{
'
img
'
:
[
'
class
'
,
'
draggable
'
,
'
alt
'
,
'
src
'
,
'
title
'
]}}));
return
html
`
<li class="emoji insert-emoji
${
o
.
shouldBeHidden
(
o
.
emoji
.
sn
)
?
'
hidden
'
:
''
}
" data-emoji="
${
o
.
emoji
.
sn
}
" title="
${
o
.
emoji
.
sn
}
">
<a href="#" @click=
${
o
.
onEmojiPicked
}
data-emoji="
${
o
.
emoji
.
sn
}
">
${
emoji
}
</a>
...
...
@@ -62,10 +59,7 @@ const emojis_for_category = (o) => html`
const
skintone_emoji
=
(
o
)
=>
{
const
shortname
=
'
:
'
+
o
.
skintone
+
'
:
'
;
let
emoji
;
if
(
o
.
_converse
.
api
.
settings
.
get
(
'
use_system_emojis
'
))
{
emoji
=
unsafeHTML
(
xss
.
filterXSS
(
o
.
transform
(
shortname
),
{
'
whiteList
'
:
{
'
img
'
:
[]}}));
}
const
emoji
=
unsafeHTML
(
xss
.
filterXSS
(
o
.
transform
(
shortname
),
{
'
whiteList
'
:
{
'
img
'
:
[
'
class
'
,
'
draggable
'
,
'
alt
'
,
'
src
'
,
'
title
'
]}}));
return
html
`
<li data-skintone="
${
o
.
skintone
}
" class="emoji-skintone
${(
o
.
current_skintone
===
o
.
skintone
)
?
'
picked
'
:
''
}
">
<a class="pick-skintone" href="#" data-skintone="
${
o
.
skintone
}
" @click=
${
o
.
onSkintonePicked
}
>
${
emoji
}
</a>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment