Skip to content

Ensure regex starts with "/" and ends with "/" #10

@aik099

Description

@aik099

The code, that transforms regex rule into a JavaScript assumes it starts with / and ends with /. In PHP however there are no such restriction. This way if somebody adds new regex rule using different delimiters it would result in JavaScript error.

I see following options:

  • either enforce specific delimiter usage (the / specifically) - easier to do, but eposes fact, that JavaScript is generated inernally
  • or replace used delimiter with / when converting to JavaScript - better, but would require escaping new delimiter inside regex as well

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions