Skip to content

Commit

Permalink
Merge pull request #35557 from tienifr/fix/34437
Browse files Browse the repository at this point in the history
  • Loading branch information
francoisl authored Feb 5, 2024
2 parents 5398ee3 + 99a9c36 commit 6a30950
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ type NextStepEmailRendererProps = {
function NextStepEmailRenderer({tnode}: NextStepEmailRendererProps) {
const styles = useThemeStyles();

return <Text style={[styles.breakWord, styles.textLabelSupporting, styles.textStrong]}>{tnode.data}</Text>;
return (
<Text
nativeID="email-with-break-opportunities"
style={[styles.breakWord, styles.textLabelSupporting, styles.textStrong]}
>
{tnode.data}
</Text>
);
}

NextStepEmailRenderer.displayName = 'NextStepEmailRenderer';
Expand Down
3 changes: 3 additions & 0 deletions src/libs/SelectionScraper/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ const replaceNodes = (dom: Node, isChildOfEditorElement: boolean): Node => {
// Encoding HTML chars '< >' in the text, because any HTML will be removed in stripHTML method.
if (dom.type.toString() === 'text' && dom instanceof DataNode) {
data = Str.htmlEncode(dom.data);
if (dom.parent instanceof Element && dom.parent?.attribs?.id === 'email-with-break-opportunities') {
data = data.replaceAll('\u200b', '');
}
} else if (dom instanceof Element) {
domName = dom.name;
if (dom.attribs?.[tagAttribute]) {
Expand Down

0 comments on commit 6a30950

Please sign in to comment.