Skip to content

Commit

Permalink
fix(FEC-12266): v7 Share button generates mostly blank email, due to …
Browse files Browse the repository at this point in the history
…Ampersand (#11)

**the issue:**
when generating email while there is an ampersand char in the video title- the email is blank and the subject and body of the email contains only content until the "&".

**solution:**
encode the video name

Solves [FEC-12266](https://kaltura.atlassian.net/browse/FEC-12266)
  • Loading branch information
lianbenjamin authored May 25, 2022
1 parent 12ee1c0 commit eb948e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/share-overlay/share-overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const ShareButton = (props: Object): React$Element<any> => {
const {templateUrl, shareUrl, embedUrl} = props.config;
let href = templateUrl;

href = href.replace(/{description}/g, props.videoDesc);
href = href.replace(/{description}/g, encodeURIComponent(props.videoDesc));
try {
href = href.replace(/{shareUrl}/g, encodeURIComponent(shareUrl));
} catch (e) {
Expand Down

0 comments on commit eb948e4

Please sign in to comment.