Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ephox/polaris

Package Overview
Dependencies
Maintainers
2
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ephox/polaris - npm Package Compare versions

Comparing version 6.0.1 to 6.0.2-alpha.0

3

CHANGELOG.md

@@ -9,2 +9,5 @@ # Changelog

### Fixed
- Fixed incorrect `Regexes.link` URL detection for path segments that contain valid characters such as `!` and `:` #TINY-5074
## 6.0.0 - 2022-03-03

@@ -11,0 +14,0 @@

5

lib/main/ts/ephox/polaris/api/Regexes.js

@@ -30,2 +30,3 @@ /*

- reduced duplication (TINY-5074)
- allow [*!;:'@$] in the path segment as they are valid characters per the spec: https://url.spec.whatwg.org/#url-path-segment-string (TINY-8069)

@@ -45,3 +46,3 @@ (?:

(?:
[-+~=.,%()\/\w]*[-+~=%()\/\w]
[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w]
)?

@@ -64,3 +65,3 @@ )?

// eslint-disable-next-line max-len
/(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-+~=.,%()\/\w]*[-+~=%()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g;
/(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g;
const autolink = () => {

@@ -67,0 +68,0 @@ /*

@@ -23,3 +23,5 @@ import { Assert, UnitTest } from '@ephox/bedrock-client';

'https://www.amazon.com.au/gp/product/B0798R2WXG/ref=s9_acsd_top_hd_bw_b5QhTfX_c_x_w?pf_rd_m=ANEGB3WVEVKZB&pf_rd_s=merchandised-search-4&pf_rd_r=KF6SD7C0M69MKF2FR9CC&pf_rd_t=101&pf_rd_p=8ad3bdba-b846-5350-9c00-72c2cb7191dd&pf_rd_i=4975211051',
'https://www.birddoctor.net/refId,56511/refDownload.pml'
'https://www.birddoctor.net/refId,56511/refDownload.pml',
'https://www.example.com/:w:/s/b026324c6904b2a9cb4b88d6d61c81d1?q=abc123',
'https://website.com/test/!test'
];

@@ -242,2 +244,3 @@ // More cases, http://formvalidation.io/validators/uri/

});
// Ignore trailing punctuation such as a comma, period and exclamation mark at the end of the URL path
const onlyWithPathLinks = {

@@ -247,2 +250,5 @@ 'http://google.com': 'http://google.com',

'http://google.com,': 'http://google.com',
'http://google.com!': 'http://google.com',
'http://google.com;': 'http://google.com',
'http://google.com:': 'http://google.com',
'http://google.com/,': 'http://google.com/',

@@ -252,2 +258,5 @@ 'http://google.com/,,': 'http://google.com/',

'http://google.com/..': 'http://google.com/',
'http://google.com/!': 'http://google.com/',
'http://google.com/:': 'http://google.com/',
'http://google.com/;': 'http://google.com/',
'http://google.com/,/': 'http://google.com/,/',

@@ -258,2 +267,5 @@ 'http://google.com/,/,': 'http://google.com/,/',

'http://google.com/abc.': 'http://google.com/abc',
'http://google.com/abc!': 'http://google.com/abc',
'http://google.com/abc;': 'http://google.com/abc',
'http://google.com/abc:': 'http://google.com/abc',
'http://google.com/,ab,c': 'http://google.com/,ab,c',

@@ -260,0 +272,0 @@ 'http://google.com/ab,c': 'http://google.com/ab,c',

{
"name": "@ephox/polaris",
"description": "This project does data manipulation on arrays and strings.",
"version": "6.0.1",
"version": "6.0.2-alpha.0",
"repository": {

@@ -22,7 +22,7 @@ "type": "git",

"dependencies": {
"@ephox/katamari": "^9.0.1",
"@ephox/katamari": "^9.0.2-alpha.0",
"tslib": "^2.0.0"
},
"devDependencies": {
"@ephox/katamari-assertions": "^4.0.1"
"@ephox/katamari-assertions": "^4.0.2-alpha.0"
},

@@ -40,3 +40,3 @@ "scripts": {

"types": "./lib/main/ts/ephox/polaris/api/Main.d.ts",
"gitHead": "4a7ff66bc38cb6d4eb40ab1b316f911e2d4627b3"
"gitHead": "92c1546bdd5bcb506cde6a428cea06d54c5f5556"
}

@@ -31,2 +31,3 @@

- reduced duplication (TINY-5074)
- allow [*!;:'@$] in the path segment as they are valid characters per the spec: https://url.spec.whatwg.org/#url-path-segment-string (TINY-8069)

@@ -46,3 +47,3 @@ (?:

(?:
[-+~=.,%()\/\w]*[-+~=%()\/\w]
[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w]
)?

@@ -66,3 +67,3 @@ )?

// eslint-disable-next-line max-len
/(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-+~=.,%()\/\w]*[-+~=%()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g;
/(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g;

@@ -69,0 +70,0 @@ const autolink = (): RegExp => {

@@ -25,3 +25,5 @@ import { Assert, UnitTest } from '@ephox/bedrock-client';

'https://www.amazon.com.au/gp/product/B0798R2WXG/ref=s9_acsd_top_hd_bw_b5QhTfX_c_x_w?pf_rd_m=ANEGB3WVEVKZB&pf_rd_s=merchandised-search-4&pf_rd_r=KF6SD7C0M69MKF2FR9CC&pf_rd_t=101&pf_rd_p=8ad3bdba-b846-5350-9c00-72c2cb7191dd&pf_rd_i=4975211051',
'https://www.birddoctor.net/refId,56511/refDownload.pml'
'https://www.birddoctor.net/refId,56511/refDownload.pml',
'https://www.example.com/:w:/s/b026324c6904b2a9cb4b88d6d61c81d1?q=abc123',
'https://website.com/test/!test'
];

@@ -257,6 +259,10 @@

const onlyWithPathLinks = { // Ignore trailing comma and period in URL path
// Ignore trailing punctuation such as a comma, period and exclamation mark at the end of the URL path
const onlyWithPathLinks = {
'http://google.com': 'http://google.com',
'http://google.com.': 'http://google.com',
'http://google.com,': 'http://google.com',
'http://google.com!': 'http://google.com',
'http://google.com;': 'http://google.com',
'http://google.com:': 'http://google.com',
'http://google.com/,': 'http://google.com/',

@@ -266,2 +272,5 @@ 'http://google.com/,,': 'http://google.com/',

'http://google.com/..': 'http://google.com/',
'http://google.com/!': 'http://google.com/',
'http://google.com/:': 'http://google.com/',
'http://google.com/;': 'http://google.com/',
'http://google.com/,/': 'http://google.com/,/',

@@ -272,2 +281,5 @@ 'http://google.com/,/,': 'http://google.com/,/',

'http://google.com/abc.': 'http://google.com/abc',
'http://google.com/abc!': 'http://google.com/abc',
'http://google.com/abc;': 'http://google.com/abc',
'http://google.com/abc:': 'http://google.com/abc',
'http://google.com/,ab,c': 'http://google.com/,ab,c',

@@ -274,0 +286,0 @@ 'http://google.com/ab,c': 'http://google.com/ab,c',

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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