WordPress.org

Make WordPress Core

Ticket #27391: wordcount-fix.27391.diff

File wordcount-fix.27391.diff, 552 bytes (added by lukechilds, 7 years ago)

Added ellipsis unicode character to 'clean' regex.

  • src/wp-admin/js/word-count.js

    diff --git src/wp-admin/js/word-count.js src/wp-admin/js/word-count.js
    index 0c537ba..d28c106 100644
    var wpWordCount; 
    55
    66                settings : {
    77                        strip : /<[a-zA-Z\/][^<>]*>/g, // strip HTML tags
    8                         clean : /[0-9.(),;:!?%#$¿'"_+=\\/-]+/g, // regexp to remove punctuation, etc.
     8                        clean : /[0-9.(),;:!?%#$¿'"_+=\u2026\\/-]+/g, // regexp to remove punctuation, etc.
    99                        w : /\S\s+/g, // word-counting regexp
    1010                        c : /\S/g // char-counting regexp for asian languages
    1111                },