Skip to content

Commit

Permalink
fix/escape regExp correctly (#53)
Browse files Browse the repository at this point in the history
* fix: escape regExp correctly

* chore: versionBump

* refactor: fix prettier issue

* chore: update package-lock
  • Loading branch information
Siolto committed Mar 5, 2024
1 parent af56e7c commit 657d043
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/content/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nmshd/content",
"version": "2.8.8",
"version": "2.8.9",
"description": "The content library defines data structures that can be transmitted using the transport library.",
"homepage": "https://enmeshed.eu",
"repository": {
Expand Down
5 changes: 3 additions & 2 deletions packages/content/src/attributes/types/strings/AbstractURL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export abstract class AbstractURL extends AbstractString {
max: 1024,
regExp: new RegExp(
// eslint-disable-next-line no-useless-escape
/^((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((?:\/[\+~%\/\.\w\-_]*)?\??(?:[\-\+=&;%@\.\w_]*)#?(?:[\.\!\/\\\w]*))?)$/i
/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)/
)
})
public override value: string;
Expand All @@ -18,7 +18,8 @@ export abstract class AbstractURL extends AbstractString {
return super.valueHints.copyWith({
min: 3,
max: 1024,
pattern: "/^((([A-Za-z]{3,9}:(?://)?)(?:[-;:&=+$,w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+$,w]+@)[A-Za-z0-9.-]+)((?:/[+~%/.w-_]*)???(?:[-+=&;%@.w_]*)#?(?:[.!/\\w]*))?)$/i"
pattern:
"/((([A-Za-z]{3,9}:(?:\\/\\/)?)(?:[-;:&=\\+\\$,\\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\\+\\$,\\w]+@)[A-Za-z0-9.-]+)((?:\\/[\\+~%\\/.\\w\\-_]*)?\\??(?:[-\\+=&;%@.\\w_]*)#?(?:[\\w]*))?)/"
});
}

Expand Down
4 changes: 2 additions & 2 deletions packages/runtime/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nmshd/runtime",
"version": "4.3.2",
"version": "4.3.3",
"description": "The enmeshed client runtime.",
"homepage": "https://enmeshed.eu",
"repository": {
Expand Down Expand Up @@ -66,7 +66,7 @@
"@js-soft/ts-serval": "2.0.10",
"@js-soft/ts-utils": "^2.3.3",
"@nmshd/consumption": "3.9.5",
"@nmshd/content": "2.8.8",
"@nmshd/content": "2.8.9",
"@nmshd/crypto": "2.0.6",
"@nmshd/transport": "2.3.4",
"ajv": "^8.12.0",
Expand Down

0 comments on commit 657d043

Please sign in to comment.