Skip to content

Commit

Permalink
Merge pull request #3238 from Expensify/jasper-copySpecialChars
Browse files Browse the repository at this point in the history
htmlDecode text before copying
  • Loading branch information
Beamanator authored May 31, 2021
2 parents 2c736e5 + e8a8d01 commit f41d405
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/home/report/ReportActionContextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {View} from 'react-native';
import PropTypes from 'prop-types';
import lodashGet from 'lodash/get';
import {withOnyx} from 'react-native-onyx';
import Str from 'expensify-common/lib/str';
import {
Clipboard as ClipboardIcon, LinkCopy, Mail, Pencil, Trashcan, Checkmark,
} from '../../../components/Icon/Expensicons';
Expand Down Expand Up @@ -88,7 +89,7 @@ class ReportActionContextMenu extends React.Component {
onPress: () => {
const message = _.last(lodashGet(this.props.reportAction, 'message', null));
const html = lodashGet(message, 'html', '');
const text = props.selection || lodashGet(message, 'text', '');
const text = Str.htmlDecode(props.selection || lodashGet(message, 'text', ''));
const isAttachment = _.has(this.props.reportAction, 'isAttachment')
? this.props.reportAction.isAttachment
: isReportMessageAttachment(text);
Expand Down

0 comments on commit f41d405

Please sign in to comment.