Skip to content

Commit

Permalink
Merge tag 'v3.27.0' into wreck/v3.27.0-wrecked
Browse files Browse the repository at this point in the history
* Sanitize untrusted variables from message previews before translation
Fixes element-hq/element-web#18314
* Fix editing of `<sub>` & `<sup`> & `<u>`
[\matrix-org#6469](matrix-org#6469)
Fixes element-hq/element-web#18211
* Zoom images in lightbox to where the cursor points
[\matrix-org#6418](matrix-org#6418)
Fixes element-hq/element-web#17870
* Avoid hitting the settings store from TextForEvent
[\matrix-org#6205](matrix-org#6205)
Fixes element-hq/element-web#17650
* Initial MSC3083 + MSC3244 support
[\matrix-org#6212](matrix-org#6212)
Fixes element-hq/element-web#17686 and element-hq/element-web#17661
* Navigate to the first room with notifications when clicked on space notification dot
[\matrix-org#5974](matrix-org#5974)
* Add matrix: to the list of permitted URL schemes
[\matrix-org#6388](matrix-org#6388)
* Add "Copy Link" to room context menu
[\matrix-org#6374](matrix-org#6374)
* 💭 Message bubble layout
[\matrix-org#6291](matrix-org#6291)
Fixes element-hq/element-web#4635, element-hq/element-web#17773 element-hq/element-web#16220 and element-hq/element-web#7687
* Play only one audio file at a time
[\matrix-org#6417](matrix-org#6417)
Fixes element-hq/element-web#17439
* Move download button for media to the action bar
[\matrix-org#6386](matrix-org#6386)
Fixes element-hq/element-web#17943
* Improved display of one-to-one call history with summary boxes for each call
[\matrix-org#6121](matrix-org#6121)
Fixes element-hq/element-web#16409
* Notification settings UI refresh
[\matrix-org#6352](matrix-org#6352)
Fixes element-hq/element-web#17782
* Fix EventIndex double handling events and erroring
[\matrix-org#6385](matrix-org#6385)
Fixes element-hq/element-web#18008
* Improve reply rendering
[\matrix-org#3553](matrix-org#3553)
Fixes element-hq/element-web#9217, element-hq/element-web#7633, element-hq/element-web#7530, element-hq/element-web#7169, element-hq/element-web#7151, element-hq/element-web#6692 element-hq/element-web#6579 and element-hq/element-web#17440
* Fix CreateRoomDialog exploding when making public room outside of a space
[\matrix-org#6493](matrix-org#6493)
* Fix regression where registration would soft-crash on captcha
[\matrix-org#6505](matrix-org#6505)
Fixes element-hq/element-web#18284
* only send join rule event if we have a join rule to put in it
[\matrix-org#6517](matrix-org#6517)
* Improve the new download button's discoverability and interactions.
[\matrix-org#6510](matrix-org#6510)
* Fix voice recording UI looking broken while microphone permissions are being requested.
[\matrix-org#6479](matrix-org#6479)
Fixes element-hq/element-web#18223
* Match colors of room and user avatars in DMs
[\matrix-org#6393](matrix-org#6393)
Fixes element-hq/element-web#2449
* Fix onPaste handler to work with copying files from Finder
[\matrix-org#5389](matrix-org#5389)
Fixes element-hq/element-web#15536 and element-hq/element-web#16255
* Fix infinite pagination loop when offline
[\matrix-org#6478](matrix-org#6478)
Fixes element-hq/element-web#18242
* Fix blurhash rounded corners missing regression
[\matrix-org#6467](matrix-org#6467)
Fixes element-hq/element-web#18110
* Fix position of the space hierarchy spinner
[\matrix-org#6462](matrix-org#6462)
Fixes element-hq/element-web#18182
* Fix display of image messages that lack thumbnails
[\matrix-org#6456](matrix-org#6456)
Fixes element-hq/element-web#18175
* Fix crash with large audio files.
[\matrix-org#6436](matrix-org#6436)
Fixes element-hq/element-web#18149
* Make diff colors in codeblocks more pleasant
[\matrix-org#6355](matrix-org#6355)
Fixes element-hq/element-web#17939
* Show the correct audio file duration while loading the file.
[\matrix-org#6435](matrix-org#6435)
Fixes element-hq/element-web#18160
* Fix various timeline settings not applying immediately.
[\matrix-org#6261](matrix-org#6261)
Fixes element-hq/element-web#17748
* Fix issues with room list duplication
[\matrix-org#6391](matrix-org#6391)
Fixes element-hq/element-web#14508
* Fix grecaptcha throwing useless error sometimes
[\matrix-org#6401](matrix-org#6401)
Fixes element-hq/element-web#15142
* Update Emojibase and Twemoji and switch to IamCal (Slack-style) shortcodes
[\matrix-org#6347](matrix-org#6347)
Fixes element-hq/element-web#13857 and element-hq/element-web#13334
* Respect compound emojis in default avatar initial generation
[\matrix-org#6397](matrix-org#6397)
Fixes element-hq/element-web#18040
* Fix bug where the 'other homeserver' field in the server selection dialog would become briefly focus and then unfocus when clicked.
[\matrix-org#6394](matrix-org#6394)
Fixes element-hq/element-web#18031
* Standardise spelling and casing of homeserver, identity server, and integration manager
[\matrix-org#6365](matrix-org#6365)
* Fix widgets not receiving decrypted events when they have permission.
[\matrix-org#6371](matrix-org#6371)
Fixes element-hq/element-web#17615
* Prevent client hangs when calculating blurhashes
[\matrix-org#6366](matrix-org#6366)
Fixes element-hq/element-web#17945
* Exclude state events from widgets reading room events
[\matrix-org#6378](matrix-org#6378)
* Cache feature_spaces\* flags to improve performance
[\matrix-org#6381](matrix-org#6381)
  • Loading branch information
William Kray committed Aug 2, 2021
2 parents b26b9f9 + e77f731 commit 90b8dae
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 192 deletions.
278 changes: 93 additions & 185 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,213 +1,121 @@
Changes in [3.27.0-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.27.0-rc.1) (2021-07-27)
===============================================================================================================
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.26.0...v3.27.0-rc.1)
Changes in [3.27.0](https://github.com/vector-im/element-desktop/releases/tag/v3.27.0) (2021-07-02)
===================================================================================================

## 🔒 SECURITY FIXES
* Sanitize untrusted variables from message previews before translation
Fixes vector-im/element-web#18314

* Fix timing of voice message recording UI appearing
## ✨ Features
* Fix editing of `<sub>` & `<sup`> & `<u>`
[\#6469](https://github.com/matrix-org/matrix-react-sdk/pull/6469)
Fixes vector-im/element-web#18211
* Zoom images in lightbox to where the cursor points
[\#6418](https://github.com/matrix-org/matrix-react-sdk/pull/6418)
Fixes vector-im/element-web#17870
* Avoid hitting the settings store from TextForEvent
[\#6205](https://github.com/matrix-org/matrix-react-sdk/pull/6205)
Fixes vector-im/element-web#17650
* Initial MSC3083 + MSC3244 support
[\#6212](https://github.com/matrix-org/matrix-react-sdk/pull/6212)
Fixes vector-im/element-web#17686 and vector-im/element-web#17661
* Navigate to the first room with notifications when clicked on space notification dot
[\#5974](https://github.com/matrix-org/matrix-react-sdk/pull/5974)
* Add matrix: to the list of permitted URL schemes
[\#6388](https://github.com/matrix-org/matrix-react-sdk/pull/6388)
* Add "Copy Link" to room context menu
[\#6374](https://github.com/matrix-org/matrix-react-sdk/pull/6374)
* 💭 Message bubble layout
[\#6291](https://github.com/matrix-org/matrix-react-sdk/pull/6291)
Fixes vector-im/element-web#4635, vector-im/element-web#17773 vector-im/element-web#16220 and vector-im/element-web#7687
* Play only one audio file at a time
[\#6417](https://github.com/matrix-org/matrix-react-sdk/pull/6417)
Fixes vector-im/element-web#17439
* Move download button for media to the action bar
[\#6386](https://github.com/matrix-org/matrix-react-sdk/pull/6386)
Fixes vector-im/element-web#17943
* Improved display of one-to-one call history with summary boxes for each call
[\#6121](https://github.com/matrix-org/matrix-react-sdk/pull/6121)
Fixes vector-im/element-web#16409
* Notification settings UI refresh
[\#6352](https://github.com/matrix-org/matrix-react-sdk/pull/6352)
Fixes vector-im/element-web#17782
* Fix EventIndex double handling events and erroring
[\#6385](https://github.com/matrix-org/matrix-react-sdk/pull/6385)
Fixes vector-im/element-web#18008
* Improve reply rendering
[\#3553](https://github.com/matrix-org/matrix-react-sdk/pull/3553)
Fixes vector-im/riot-web#9217, vector-im/riot-web#7633, vector-im/riot-web#7530, vector-im/riot-web#7169, vector-im/riot-web#7151, vector-im/riot-web#6692 vector-im/riot-web#6579 and vector-im/element-web#17440

## 🐛 Bug Fixes
* Fix CreateRoomDialog exploding when making public room outside of a space
[\#6493](https://github.com/matrix-org/matrix-react-sdk/pull/6493)
* Fix regression where registration would soft-crash on captcha
[\#6505](https://github.com/matrix-org/matrix-react-sdk/pull/6505)
Fixes vector-im/element-web#18284
* only send join rule event if we have a join rule to put in it
[\#6517](https://github.com/matrix-org/matrix-react-sdk/pull/6517)
* Improve the new download button's discoverability and interactions.
[\#6510](https://github.com/matrix-org/matrix-react-sdk/pull/6510)
* Fix voice recording UI looking broken while microphone permissions are being requested.
[\#6479](https://github.com/matrix-org/matrix-react-sdk/pull/6479)
* Fix PiP resize issues
[\#6483](https://github.com/matrix-org/matrix-react-sdk/pull/6483)
* Translations update from Weblate
[\#6482](https://github.com/matrix-org/matrix-react-sdk/pull/6482)
* Make new reply UI clickable
[\#6474](https://github.com/matrix-org/matrix-react-sdk/pull/6474)
Fixes vector-im/element-web#18223
* Match colors of room and user avatars in DMs
[\#6393](https://github.com/matrix-org/matrix-react-sdk/pull/6393)
Fixes vector-im/element-web#2449
* Fix onPaste handler to work with copying files from Finder
[\#5389](https://github.com/matrix-org/matrix-react-sdk/pull/5389)
Fixes vector-im/element-web#15536 and vector-im/element-web#16255
* Fix infinite pagination loop when offline
[\#6478](https://github.com/matrix-org/matrix-react-sdk/pull/6478)
* Fix deleted message left offset in the timeline
[\#6473](https://github.com/matrix-org/matrix-react-sdk/pull/6473)
* Fix broken layout of the space hierarchy view
[\#6481](https://github.com/matrix-org/matrix-react-sdk/pull/6481)
* Add data-layout to MELS for better CSS structure
[\#6480](https://github.com/matrix-org/matrix-react-sdk/pull/6480)
* Style markdown quotes
[\#6468](https://github.com/matrix-org/matrix-react-sdk/pull/6468)
* Update ESLint Config
[\#6476](https://github.com/matrix-org/matrix-react-sdk/pull/6476)
* Fix VoIP event tile issues
[\#6471](https://github.com/matrix-org/matrix-react-sdk/pull/6471)
* Fix editing of <sub> & <sup> & <u>
[\#6469](https://github.com/matrix-org/matrix-react-sdk/pull/6469)
* Fix avatar overlapping with timestamp
[\#6461](https://github.com/matrix-org/matrix-react-sdk/pull/6461)
* Fix reactions row pushing content on IRC layout
[\#6464](https://github.com/matrix-org/matrix-react-sdk/pull/6464)
Fixes vector-im/element-web#18242
* Fix blurhash rounded corners missing regression
[\#6467](https://github.com/matrix-org/matrix-react-sdk/pull/6467)
* Adhere to better eslint rules
[\#6459](https://github.com/matrix-org/matrix-react-sdk/pull/6459)
* Clean up voice messages code
[\#6453](https://github.com/matrix-org/matrix-react-sdk/pull/6453)
Fixes vector-im/element-web#18110
* Fix position of the space hierarchy spinner
[\#6462](https://github.com/matrix-org/matrix-react-sdk/pull/6462)
* Fix clipped avatar in room list
[\#6463](https://github.com/matrix-org/matrix-react-sdk/pull/6463)
* Make inline events feel less claustrophobic in bubble layout
[\#6460](https://github.com/matrix-org/matrix-react-sdk/pull/6460)
* Initial MSC3083 + MSC3244 support
[\#6212](https://github.com/matrix-org/matrix-react-sdk/pull/6212)
* Add event selected state for message bubbles
[\#6449](https://github.com/matrix-org/matrix-react-sdk/pull/6449)
* Make images fit inside message bubble
[\#6448](https://github.com/matrix-org/matrix-react-sdk/pull/6448)
* Don't show scrollbar for URL previews
[\#6450](https://github.com/matrix-org/matrix-react-sdk/pull/6450)
Fixes vector-im/element-web#18182
* Fix display of image messages that lack thumbnails
[\#6456](https://github.com/matrix-org/matrix-react-sdk/pull/6456)
* Fix avatar obstructing membership and state changes
[\#6439](https://github.com/matrix-org/matrix-react-sdk/pull/6439)
* Zoom images in lightbox to where the cursor points
[\#6418](https://github.com/matrix-org/matrix-react-sdk/pull/6418)
* Always display the Sender in the reply tile
[\#6446](https://github.com/matrix-org/matrix-react-sdk/pull/6446)
* Use modern layout in file and notification panel
[\#6447](https://github.com/matrix-org/matrix-react-sdk/pull/6447)
* Add right padding for event replies
[\#6444](https://github.com/matrix-org/matrix-react-sdk/pull/6444)
* Fix event tile cut off in share preview
[\#6445](https://github.com/matrix-org/matrix-react-sdk/pull/6445)
* Remove excessive padding after url previews
[\#6443](https://github.com/matrix-org/matrix-react-sdk/pull/6443)
* Make quotes thinner
[\#6441](https://github.com/matrix-org/matrix-react-sdk/pull/6441)
* Prevent action bar to overlap the event content
[\#6438](https://github.com/matrix-org/matrix-react-sdk/pull/6438)
* Use a MediaElementSourceAudioNode to process large audio files
Fixes vector-im/element-web#18175
* Fix crash with large audio files.
[\#6436](https://github.com/matrix-org/matrix-react-sdk/pull/6436)
* Revert 100% on codeblocks
[\#6440](https://github.com/matrix-org/matrix-react-sdk/pull/6440)
* Fix duration placeholder parsing for audio files
[\#6435](https://github.com/matrix-org/matrix-react-sdk/pull/6435)
* Handle upload errors in voice messages
[\#6434](https://github.com/matrix-org/matrix-react-sdk/pull/6434)
* Render error state for audio components
[\#6433](https://github.com/matrix-org/matrix-react-sdk/pull/6433)
* Clean up visual style of files and voice messages
[\#6432](https://github.com/matrix-org/matrix-react-sdk/pull/6432)
* Convert a few things to TS
[\#6413](https://github.com/matrix-org/matrix-react-sdk/pull/6413)
* Fix onPaste handler to work with copying files from Finder
[\#5389](https://github.com/matrix-org/matrix-react-sdk/pull/5389)
* Increase hit area for timestamp in message bubbles
[\#6428](https://github.com/matrix-org/matrix-react-sdk/pull/6428)
* Navigate to the first room with notifications when clicked on space
notification dot
[\#5974](https://github.com/matrix-org/matrix-react-sdk/pull/5974)
* Add matrix: to the list of permitted URL schemes
[\#6388](https://github.com/matrix-org/matrix-react-sdk/pull/6388)
Fixes vector-im/element-web#18149
* Make diff colors in codeblocks more pleasant
[\#6355](https://github.com/matrix-org/matrix-react-sdk/pull/6355)
* Add alwaysShowTimestamps and others to RoomView setting watchers
Fixes vector-im/element-web#17939
* Show the correct audio file duration while loading the file.
[\#6435](https://github.com/matrix-org/matrix-react-sdk/pull/6435)
Fixes vector-im/element-web#18160
* Fix various timeline settings not applying immediately.
[\#6261](https://github.com/matrix-org/matrix-react-sdk/pull/6261)
* Restore 'use default' naming on room notifications
[\#6431](https://github.com/matrix-org/matrix-react-sdk/pull/6431)
* Use cached value to read member count
[\#6429](https://github.com/matrix-org/matrix-react-sdk/pull/6429)
* yarn upgrade
[\#6430](https://github.com/matrix-org/matrix-react-sdk/pull/6430)
* Improve new layout switcher UI
[\#6427](https://github.com/matrix-org/matrix-react-sdk/pull/6427)
* Play only one audio file at a time
[\#6417](https://github.com/matrix-org/matrix-react-sdk/pull/6417)
* Improve file labeling in replies
[\#6404](https://github.com/matrix-org/matrix-react-sdk/pull/6404)
* Fix replies line clamping
[\#6425](https://github.com/matrix-org/matrix-react-sdk/pull/6425)
* Add null guard for room prop in EventTile
[\#6426](https://github.com/matrix-org/matrix-react-sdk/pull/6426)
* Fix font slider preview for message bubbles
[\#6421](https://github.com/matrix-org/matrix-react-sdk/pull/6421)
* Add spoiler support for message bubbles
[\#6419](https://github.com/matrix-org/matrix-react-sdk/pull/6419)
* Fix error when hovering over non-emoji reactions
[\#6416](https://github.com/matrix-org/matrix-react-sdk/pull/6416)
* Fix sticker display for message bubbles
[\#6423](https://github.com/matrix-org/matrix-react-sdk/pull/6423)
* Reintroduce grouped events padding on modern layout
[\#6420](https://github.com/matrix-org/matrix-react-sdk/pull/6420)
* TypeScript migration for auth components
[\#6412](https://github.com/matrix-org/matrix-react-sdk/pull/6412)
Fixes vector-im/element-web#17748
* Fix issues with room list duplication
[\#6391](https://github.com/matrix-org/matrix-react-sdk/pull/6391)
Fixes vector-im/element-web#14508
* Fix grecaptcha throwing useless error sometimes
[\#6401](https://github.com/matrix-org/matrix-react-sdk/pull/6401)
* Move download button for media to the action bar
[\#6386](https://github.com/matrix-org/matrix-react-sdk/pull/6386)
* Remove hover effect from files in the files panel
[\#6405](https://github.com/matrix-org/matrix-react-sdk/pull/6405)
* Revert accidental renaming of dispatcherRef
[\#6415](https://github.com/matrix-org/matrix-react-sdk/pull/6415)
* Add VoIP event tiles
[\#6121](https://github.com/matrix-org/matrix-react-sdk/pull/6121)
Fixes vector-im/element-web#15142
* Update Emojibase and Twemoji and switch to IamCal (Slack-style) shortcodes
[\#6347](https://github.com/matrix-org/matrix-react-sdk/pull/6347)
* Conform to new react and typescript eslint rules
[\#6408](https://github.com/matrix-org/matrix-react-sdk/pull/6408)
* Remove unwanted comma in EventTile
[\#6414](https://github.com/matrix-org/matrix-react-sdk/pull/6414)
* 💭 Message bubble layout
[\#6291](https://github.com/matrix-org/matrix-react-sdk/pull/6291)
* Fix sticker placeholder centering
[\#6411](https://github.com/matrix-org/matrix-react-sdk/pull/6411)
* Fix avatar placeholders not getting capitalized
[\#6407](https://github.com/matrix-org/matrix-react-sdk/pull/6407)
* Revert order of notification setting radios
[\#6406](https://github.com/matrix-org/matrix-react-sdk/pull/6406)
Fixes vector-im/element-web#13857 and vector-im/element-web#13334
* Respect compound emojis in default avatar initial generation
[\#6397](https://github.com/matrix-org/matrix-react-sdk/pull/6397)
* Update eslint-plugin-matrix-org
[\#6403](https://github.com/matrix-org/matrix-react-sdk/pull/6403)
* Rename Copy Link to Copy Room Link
[\#6402](https://github.com/matrix-org/matrix-react-sdk/pull/6402)
* Don't throw exception from setStickyRoom as it split-brains the
RoomListStore
[\#6399](https://github.com/matrix-org/matrix-react-sdk/pull/6399)
* Fix bug where 'other homeserver' would unfocus
Fixes vector-im/element-web#18040
* Fix bug where the 'other homeserver' field in the server selection dialog would become briefly focus and then unfocus when clicked.
[\#6394](https://github.com/matrix-org/matrix-react-sdk/pull/6394)
* Cleanup reply code
[\#6392](https://github.com/matrix-org/matrix-react-sdk/pull/6392)
* Match colors of room and user avatars in DMs
[\#6393](https://github.com/matrix-org/matrix-react-sdk/pull/6393)
* Remove title from Image View
[\#6395](https://github.com/matrix-org/matrix-react-sdk/pull/6395)
* Notification settings UI refresh
[\#6352](https://github.com/matrix-org/matrix-react-sdk/pull/6352)
* Avoid hitting the settings store from TextForEvent
[\#6205](https://github.com/matrix-org/matrix-react-sdk/pull/6205)
* Fix issues with room list duplication
[\#6391](https://github.com/matrix-org/matrix-react-sdk/pull/6391)
* Use URLSearchParams instead of transitive dependency `querystring`
[\#4399](https://github.com/matrix-org/matrix-react-sdk/pull/4399)
* Add "Copy Link" to room context menu
[\#6374](https://github.com/matrix-org/matrix-react-sdk/pull/6374)
* Fix EventIndex double handling events and erroring
[\#6385](https://github.com/matrix-org/matrix-react-sdk/pull/6385)
* Fix IRC layout replies
[\#6387](https://github.com/matrix-org/matrix-react-sdk/pull/6387)
* Improve reply rendering
[\#3553](https://github.com/matrix-org/matrix-react-sdk/pull/3553)
* Update PR template for new changelog generation
[\#6380](https://github.com/matrix-org/matrix-react-sdk/pull/6380)
* Silence / Fix some console warnings/errors
[\#6382](https://github.com/matrix-org/matrix-react-sdk/pull/6382)
* Cache value of feature_spaces* flags as they cause page refresh so are
immutable
[\#6381](https://github.com/matrix-org/matrix-react-sdk/pull/6381)
* Standardise spelling and casing of homeserver, identity server, and
integration manager
Fixes vector-im/element-web#18031
* Standardise spelling and casing of homeserver, identity server, and integration manager
[\#6365](https://github.com/matrix-org/matrix-react-sdk/pull/6365)
* Convert CONTRIBUTING to markdown
[\#6379](https://github.com/matrix-org/matrix-react-sdk/pull/6379)
* Move blurhashing into a Worker and use OffscreenCanvas for thumbnailing
* Fix widgets not receiving decrypted events when they have permission.
[\#6371](https://github.com/matrix-org/matrix-react-sdk/pull/6371)
Fixes vector-im/element-web#17615
* Prevent client hangs when calculating blurhashes
[\#6366](https://github.com/matrix-org/matrix-react-sdk/pull/6366)
Fixes vector-im/element-web#17945
* Exclude state events from widgets reading room events
[\#6378](https://github.com/matrix-org/matrix-react-sdk/pull/6378)
* Use webpack worker-loader instead of homegrown hack
[\#6356](https://github.com/matrix-org/matrix-react-sdk/pull/6356)
* Send clear events to widgets when permitted
[\#6371](https://github.com/matrix-org/matrix-react-sdk/pull/6371)
* Comment why end to end tests are only on the develop branch
[\#6377](https://github.com/matrix-org/matrix-react-sdk/pull/6377)
* Improve and consolidate typing
[\#6345](https://github.com/matrix-org/matrix-react-sdk/pull/6345)
* Fix 'User' type import
[\#6375](https://github.com/matrix-org/matrix-react-sdk/pull/6375)
* Cache feature_spaces\* flags to improve performance
[\#6381](https://github.com/matrix-org/matrix-react-sdk/pull/6381)

Changes in [3.26.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.26.0) (2021-07-19)
=====================================================================================================
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "matrix-react-sdk",
"version": "3.27.0-rc.1",
"version": "3.27.0",
"description": "SDK for matrix.org using React",
"author": "matrix.org",
"repository": {
Expand Down Expand Up @@ -80,7 +80,7 @@
"katex": "^0.12.0",
"linkifyjs": "^2.1.9",
"lodash": "^4.17.20",
"matrix-js-sdk": "12.2.0-rc.1",
"matrix-js-sdk": "12.2.0",
"matrix-widget-api": "^0.1.0-beta.15",
"minimist": "^1.2.5",
"opus-recorder": "^8.0.3",
Expand Down
11 changes: 11 additions & 0 deletions src/languageHandler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,17 @@ export function _t(text: string, variables?: IVariables, tags?: Tags): Translate
}
}

/**
* Sanitizes unsafe text for the sanitizer, ensuring references to variables will not be considered
* replaceable by the translation functions.
* @param {string} text The text to sanitize.
* @returns {string} The sanitized text.
*/
export function sanitizeForTranslation(text: string): string {
// Add a non-breaking space so the regex doesn't trigger when translating.
return text.replace(/%\(([^)]*)\)/g, '%\xa0($1)');
}

/*
* Similar to _t(), except only does substitutions, and no translation
* @param {string} text The text, e.g "click <a>here</a> now to %(foo)s".
Expand Down
4 changes: 3 additions & 1 deletion src/stores/room-list/previews/MessageEventPreview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
import { IPreview } from "./IPreview";
import { TagID } from "../models";
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
import { _t } from "../../../languageHandler";
import { _t, sanitizeForTranslation } from "../../../languageHandler";
import { getSenderName, isSelf, shouldPrefixMessagesIn } from "./utils";
import ReplyThread from "../../../components/views/elements/ReplyThread";
import { getHtmlText } from "../../../HtmlUtils";
Expand Down Expand Up @@ -58,6 +58,8 @@ export class MessageEventPreview implements IPreview {
body = getHtmlText(body);
}

body = sanitizeForTranslation(body);

if (msgtype === 'm.emote') {
return _t("* %(senderName)s %(emote)s", { senderName: getSenderName(event), emote: body });
}
Expand Down
Loading

0 comments on commit 90b8dae

Please sign in to comment.