Skip to content
Permalink
Browse files

Comments: In AJAX response when deleting a comment, account for `&nbs…

…p;` as a thousands separator in `total_items_i18n` and `total_pages_i18n` numbers.

Props denisco, SergeyBiryukov.
Fixes #47953.

git-svn-id: https://develop.svn.wordpress.org/trunk@45918 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information...
SergeyBiryukov committed Aug 30, 2019
1 parent 3a0faad commit 5377bc484bf86baf21bd65d82e485e17e4672962
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/js/_enqueues/admin/edit-comments.js
@@ -656,8 +656,8 @@ window.setCommentsList = function() {
if ( response.supplemental.total_items_i18n && lastConfidentTime < response.supplemental.time ) {
total_items_i18n = response.supplemental.total_items_i18n || '';
if ( total_items_i18n ) {
$('.displaying-num').text( total_items_i18n );
$('.total-pages').text( response.supplemental.total_pages_i18n );
$('.displaying-num').text( total_items_i18n.replace( '&nbsp;', String.fromCharCode( 160 ) ) );
$('.total-pages').text( response.supplemental.total_pages_i18n.replace( '&nbsp;', String.fromCharCode( 160 ) ) );
$('.tablenav-pages').find('.next-page, .last-page').toggleClass('disabled', response.supplemental.total_pages == $('.current-page').val());
}
updateTotalCount( total, response.supplemental.time, true );

0 comments on commit 5377bc4

Please sign in to comment.
You can’t perform that action at this time.