diff --git a/src/components/ReportActionItem/IOUQuote.js b/src/components/ReportActionItem/IOUQuote.js index 032297505a7..f93888d4144 100644 --- a/src/components/ReportActionItem/IOUQuote.js +++ b/src/components/ReportActionItem/IOUQuote.js @@ -2,7 +2,6 @@ import React from 'react'; import {View, Pressable} from 'react-native'; import PropTypes from 'prop-types'; import _ from 'underscore'; -import Str from 'expensify-common/lib/str'; import Text from '../Text'; import Icon from '../Icon'; import * as Expensicons from '../Icon/Expensicons'; @@ -76,14 +75,14 @@ const IOUQuote = props => ( {/* Get first word of IOU message */} - {Str.htmlDecode(fragment.text.split(' ')[0])} + {fragment.text.split(' ')[0]} {/* Get remainder of IOU message */} - {Str.htmlDecode(fragment.text.substring(fragment.text.indexOf(' ')))} + {fragment.text.substring(fragment.text.indexOf(' '))} diff --git a/src/components/ReportTransaction.js b/src/components/ReportTransaction.js index 5586f5e67c2..be53b11c742 100644 --- a/src/components/ReportTransaction.js +++ b/src/components/ReportTransaction.js @@ -1,7 +1,6 @@ import React, {Component} from 'react'; import PropTypes from 'prop-types'; import {View} from 'react-native'; -import Str from 'expensify-common/lib/str'; import styles from '../styles/styles'; import CONST from '../CONST'; import * as IOU from '../libs/actions/IOU'; @@ -77,7 +76,7 @@ class ReportTransaction extends Component { wrapperStyles={[styles.reportTransactionWrapper]} > - {Str.htmlDecode(this.props.action.message[0].html)} + {this.props.action.message[0].text} {this.props.canBeRejected && ( diff --git a/src/libs/Notification/LocalNotification/BrowserNotifications.js b/src/libs/Notification/LocalNotification/BrowserNotifications.js index 8b00870312c..170f05aacf7 100644 --- a/src/libs/Notification/LocalNotification/BrowserNotifications.js +++ b/src/libs/Notification/LocalNotification/BrowserNotifications.js @@ -1,6 +1,5 @@ // Web and desktop implementation only. Do not import for direct use. Use LocalNotification. import _ from 'underscore'; -import Str from 'expensify-common/lib/str'; import focusApp from './focusApp'; import * as AppUpdate from '../../actions/AppUpdate'; import EXPENSIFY_ICON_URL from '../../../../assets/images/expensify-logo-round-clearspace.png'; @@ -107,10 +106,10 @@ export default { */ pushReportCommentNotification({reportAction, onClick}, usesIcon = false) { const {person, message} = reportAction; - const plainTextPerson = Str.htmlDecode(_.map(person, f => f.text).join()); + const plainTextPerson = _.map(person, f => f.text).join(); // Specifically target the comment part of the message - const plainTextMessage = Str.htmlDecode((_.find(message, f => f.type === 'COMMENT') || {}).text); + const plainTextMessage = (_.find(message, f => f.type === 'COMMENT') || {}).text; push({ title: plainTextPerson, diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index 2b91b20462a..35eb00229b7 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -328,7 +328,7 @@ function createOption(logins, personalDetails, report, reportActions = {}, { if (ReportUtils.isReportMessageAttachment({text: report.lastMessageText, html: report.lastMessageHtml})) { lastMessageTextFromReport = `[${Localize.translateLocal('common.attachment')}]`; } else { - lastMessageTextFromReport = Str.htmlDecode(report ? report.lastMessageText : ''); + lastMessageTextFromReport = report ? report.lastMessageText : ''; } const lastActorDetails = personalDetailMap[report.lastActorEmail] || null; diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index bb07c7d25e3..df0a3209e5a 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -986,7 +986,6 @@ function getIOUReportActionMessage(type, total, participants, comment, currency, const who = displayNames.length < 3 ? displayNames.join(' and ') : `${displayNames.slice(0, -1).join(', ')}, and ${_.last(displayNames)}`; - let paymentMethodMessage; switch (paymentType) { case CONST.IOU.PAYMENT_TYPE.EXPENSIFY: diff --git a/src/pages/home/report/ReportActionItemFragment.js b/src/pages/home/report/ReportActionItemFragment.js index 04a57a1178a..743192fa610 100644 --- a/src/pages/home/report/ReportActionItemFragment.js +++ b/src/pages/home/report/ReportActionItemFragment.js @@ -142,7 +142,7 @@ const ReportActionItemFragment = (props) => { numberOfLines={props.isSingleLine ? 1 : undefined} style={[styles.chatItemMessageHeaderSender, (props.isSingleLine ? styles.pre : styles.preWrap)]} > - {Str.htmlDecode(props.fragment.text)} + {props.fragment.text} );