New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ckeditor-wordcount-plugin

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ckeditor-wordcount-plugin - npm Package Compare versions

Comparing version 1.17.10 to 1.17.11

2

package.json
{
"name": "ckeditor-wordcount-plugin",
"version": "1.17.10",
"version": "1.17.11",
"author": "w8tcha",

@@ -5,0 +5,0 @@ "description": "WordCount Plugin for CKEditor Editor",

@@ -29,3 +29,3 @@ CKEditor-WordCount-Plugin

```javascript
config.extraPlugins = 'wordcount,notification';
config.extraPlugins = 'wordcount';
```

@@ -32,0 +32,0 @@

@@ -9,3 +9,3 @@ /**

lang: "ar,bg,ca,cs,da,de,el,en,es,eu,fa,fi,fr,he,hr,hu,it,ka,ko,ja,nl,no,pl,pt,pt-br,ru,sk,sv,tr,uk,zh-cn,zh,ro", // %REMOVE_LINE_CORE%
version: "1.17.10",
version: "1.17.11",
requires: "htmlwriter,notification,undo",

@@ -186,7 +186,9 @@ bbcodePluginLoaded: false,

if (tmp.textContent == "" && typeof tmp.innerText == "undefined") {
// Parse filtered HTML, without applying it to any element in DOM
var tmp = new DOMParser().parseFromString(html, 'text/html');
if (!tmp.body || !tmp.body.textContent) {
return "";
}
return tmp.textContent || tmp.innerText;
return tmp.body.textContent || tmp.body.innerText;
}

@@ -260,4 +262,11 @@

function countWords(text) {
var normalizedText = text.replace(/(<([^>]+)>)/ig, " ").replace(/(\r\n|\n|\r)/gm, "").replace(/^\s+|\s+$/g, "")
.replace("&nbsp;", " ");
/**
* we may end up with a couple of extra spaces in a row with all these replacements, but that's ok
* since we're going to split on one or more delimiters when we generate the words array
**/
var normalizedText = text.replace(/(<([^>]+)>)/ig, " ") //replace html tags, i think?
.replace(/(\r\n|\n|\r)/gm, " ") //replace new lines(in many forms)
.replace(/^\s+|\s+$/g, " ") //replace leading or trailing multiple spaces
.replace("&nbsp;", " "); //replace html entities indicating a space

@@ -264,0 +273,0 @@ normalizedText = strip(normalizedText);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc