Decode dollar signs in safe widget URLs before rendering/templating

Fixes https://github.com/vector-im/riot-web/issues/13344
pull/21833/head
Travis Ralston 2020-04-23 15:22:54 -06:00
parent 3b362f2845
commit efaf4fbbda
1 changed files with 4 additions and 1 deletions

View File

@ -636,7 +636,10 @@ export default class AppTile extends React.Component {
if (ALLOWED_APP_URL_SCHEMES.includes(parsedWidgetUrl.protocol)) {
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() {