diff --git a/CHANGES.md b/CHANGES.md index fd7fc1f4d..4d6444520 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -18,9 +18,10 @@ Soon we'll deprecate the latter, so prepare now. and [muc_roomid_policy_hint](https://conversejs.org/docs/html/configuration.html#muc-roomid-policy-hint) - #1826: A user can now add himself as a contact - #1839: Headline messages are shown in controlbox -- #1896: Don't send receipts for messages fetched from the archive +- #1896: Don't send receipts for messages fetched from the archive - #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` - 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) diff --git a/src/converse-muc-views.js b/src/converse-muc-views.js index a2cebddef..400da7374 100644 --- a/src/converse-muc-views.js +++ b/src/converse-muc-views.js @@ -33,7 +33,6 @@ import tpl_muc_sidebar from "templates/muc_sidebar.js"; import tpl_room_description from "templates/room_description.html"; import tpl_room_panel from "templates/room_panel.html"; import tpl_spinner from "templates/spinner.html"; -import xss from "xss/dist/xss"; const { Strophe, sizzle, $iq, $pres } = converse.env; const u = converse.env.utils; @@ -543,7 +542,7 @@ converse.plugins.add('converse-muc-views', { 'label_room_address': _converse.muc_domain ? __('Groupchat name') : __('Groupchat address'), 'chatroom_placeholder': placeholder, 'muc_roomid_policy_error_msg': this.muc_roomid_policy_error_msg, - 'muc_roomid_policy_hint': xss.filterXSS(_converse.muc_roomid_policy_hint, {'whiteList': {b: [], br: [], em: []}}) + 'muc_roomid_policy_hint': _converse.muc_roomid_policy_hint })); }, diff --git a/src/templates/add_chatroom_modal.js b/src/templates/add_chatroom_modal.js index a72ef5659..6ea632ce8 100644 --- a/src/templates/add_chatroom_modal.js +++ b/src/templates/add_chatroom_modal.js @@ -1,7 +1,8 @@ import { html } from "lit-html"; +import { unsafeHTML } from "lit-html/directives/unsafe-html.js"; import { __ } from '@converse/headless/i18n'; import { modal_header_close_button } from "./buttons" - +import xss from "xss/dist/xss"; const i18n_join = __('Join'); const i18n_enter = __('Enter a new Groupchat'); @@ -32,7 +33,7 @@ export default (o) => html` ${ (o.muc_roomid_policy_error_msg) ? html`` : '' } - ${ o.muc_roomid_policy_hint ? html`
{{o.muc_roomid_policy_hint}}
` : '' } + ${ o.muc_roomid_policy_hint ? html`
${unsafeHTML(xss.filterXSS(o.muc_roomid_policy_hint, {'whiteList': {b: [], br: [], em: []}}))}
` : '' } ${ !o._converse.locked_muc_nickname ? nickname_input(o) : '' }