You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-14 19:02:33 +03:00
Decode dollar signs in safe widget URLs before rendering/templating
Fixes https://github.com/vector-im/riot-web/issues/13344
This commit is contained in:
@@ -636,7 +636,10 @@ export default class AppTile extends React.Component {
|
|||||||
if (ALLOWED_APP_URL_SCHEMES.includes(parsedWidgetUrl.protocol)) {
|
if (ALLOWED_APP_URL_SCHEMES.includes(parsedWidgetUrl.protocol)) {
|
||||||
safeWidgetUrl = url.format(parsedWidgetUrl);
|
safeWidgetUrl = url.format(parsedWidgetUrl);
|
||||||
}
|
}
|
||||||
return safeWidgetUrl;
|
|
||||||
|
// Replace all the dollar signs back to dollar signs as they don't affect HTTP at all.
|
||||||
|
// We also need the dollar signs in-tact for variable substitution.
|
||||||
|
return safeWidgetUrl.replace(/%24/g, '$');
|
||||||
}
|
}
|
||||||
|
|
||||||
_getTileTitle() {
|
_getTileTitle() {
|
||||||
|
|||||||
Reference in New Issue
Block a user