Project

General

Profile

Actions

Bug #16275

closed

Add a generic method to escape regex chars in a string

Added by Félix DALLIDET almost 5 years ago. Updated over 2 years ago.

Status:
Released
Priority:
N/A
Category:
Generic methods
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Reviewed
Fix check:
Checked
Regression:

Description

We may want to use a given string in Rudder which may contains several regex chars that need to be escaped when passed to a regex intended input.
Obvious case is the "File content" technique and its replacement field.

The method will take the complete name of an already defined variable (i.e. prefix.name) and defined a prefix.name_escaped variable with the proper escaped string

Actions #1

Updated by Félix DALLIDET almost 5 years ago

  • Status changed from New to In progress
  • Assignee set to Félix DALLIDET
Actions #2

Updated by Félix DALLIDET almost 5 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Félix DALLIDET to Alexis Mousset
  • Pull Request set to https://github.com/Normation/ncf/pull/1117
Actions #3

Updated by Félix DALLIDET almost 5 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset commit:d1c354477a0e081d5ec90e6ee0a8e2e5668eb382.

Actions #4

Updated by Nicolas CHARLES almost 5 years ago

  • Fix check changed from To do to Checked
Actions #5

Updated by Alexis Mousset almost 5 years ago

  • Name check changed from To do to Reviewed
Actions #6

Updated by Vincent MEMBRÉ almost 5 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 5.0.15 which was released today.

Actions #7

Updated by Alexis Mousset over 2 years ago

  • Project changed from 41 to Rudder
  • Category changed from Generic methods to Generic methods
Actions

Also available in: Atom PDF