Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mgr/dashboard: Escape regex pattern in DeletionModalComponent #23420

Merged
merged 1 commit into from
Aug 7, 2018

Conversation

tspmelo
Copy link
Contributor

@tspmelo tspmelo commented Aug 3, 2018

Fixes: http://tracker.ceph.com/issues/24902

Signed-off-by: Tiago Melo tmelo@suse.com

@@ -93,4 +93,8 @@ export class DeletionModalComponent implements OnInit {
stopLoadingSpinner() {
this.deletionForm.setErrors({ cdSubmitButton: true });
}

escapeRegExp(text) {
return text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add tests :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Member

@callithea callithea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link

@Devp00l Devp00l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sebastian-philipp sebastian-philipp merged commit 94198c0 into ceph:master Aug 7, 2018
@tspmelo tspmelo deleted the fix-24902 branch August 7, 2018 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants