mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-18 21:34:28 -04:00
removed striphtml (as per lidarr)
This commit is contained in:
@@ -139,8 +139,7 @@ class Queue extends Component {
|
||||
allUnselected,
|
||||
selectedState,
|
||||
isConfirmRemoveModalOpen,
|
||||
isPendingSelected,
|
||||
items
|
||||
isPendingSelected
|
||||
} = this.state;
|
||||
|
||||
const isRefreshing = isFetching || isAuthorFetching || isBooksFetching || isRefreshMonitoredDownloadsExecuting;
|
||||
|
||||
@@ -515,7 +515,7 @@ class AuthorDetails extends Component {
|
||||
<div className={styles.overview}>
|
||||
<TextTruncate
|
||||
line={Math.floor(125 / (defaultFontSize * lineHeight))}
|
||||
text={stripHtml(overview)}
|
||||
text={overview}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -204,7 +204,7 @@ class AuthorIndexOverview extends Component {
|
||||
>
|
||||
<TextTruncate
|
||||
line={Math.floor(overviewHeight / (defaultFontSize * lineHeight))}
|
||||
text={stripHtml(overview)}
|
||||
text={overview}
|
||||
/>
|
||||
</Link>
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ import InteractiveSearchTable from 'InteractiveSearch/InteractiveSearchTable';
|
||||
import OrganizePreviewModalConnector from 'Organize/OrganizePreviewModalConnector';
|
||||
import fonts from 'Styles/Variables/fonts';
|
||||
import formatBytes from 'Utilities/Number/formatBytes';
|
||||
import stripHtml from 'Utilities/String/stripHtml';
|
||||
import BookDetailsLinks from './BookDetailsLinks';
|
||||
import styles from './BookDetails.css';
|
||||
|
||||
@@ -361,7 +360,7 @@ class BookDetails extends Component {
|
||||
<div className={styles.overview}>
|
||||
<TextTruncate
|
||||
line={Math.floor(125 / (defaultFontSize * lineHeight))}
|
||||
text={stripHtml(overview)}
|
||||
text={overview}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -190,7 +190,7 @@ class AddNewAuthorSearchResult extends Component {
|
||||
<TextTruncate
|
||||
truncateText="…"
|
||||
line={Math.floor(height / (defaultFontSize * lineHeight))}
|
||||
text={stripHtml(overview)}
|
||||
text={overview}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -93,7 +93,7 @@ class AddNewBookModalContent extends Component {
|
||||
<TextTruncate
|
||||
truncateText="…"
|
||||
line={8}
|
||||
text={stripHtml(overview)}
|
||||
text={overview}
|
||||
/>
|
||||
</div> :
|
||||
null
|
||||
|
||||
@@ -175,7 +175,7 @@ class AddNewBookSearchResult extends Component {
|
||||
<TextTruncate
|
||||
truncateText="…"
|
||||
line={Math.floor(height / (defaultFontSize * lineHeight))}
|
||||
text={stripHtml(overview)}
|
||||
text={overview}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
function stripHtml(html) {
|
||||
if (!html) {
|
||||
return html;
|
||||
}
|
||||
|
||||
const fiddled = html.replace(/<br\/>/g, ' ');
|
||||
|
||||
const doc = new DOMParser().parseFromString(fiddled, 'text/html');
|
||||
const text = doc.body.textContent || '';
|
||||
return text.replace(/([;,.])([^\s.])/g, '$1 $2').replace(/\s{2,}/g, ' ').replace(/s+…/g, '…');
|
||||
}
|
||||
|
||||
export default stripHtml;
|
||||
Reference in New Issue
Block a user