Problem/Motivation

OrejimeManager::setOptIn() triggers a warning if the script contains a slash character:

Warning: preg_grep(): Unknown modifier 'o'

Steps to reproduce

Create an Orejime service with this in the Scripts field:

core/modules/toolbar/js/toolbar.js

Proposed resolution

I think the delimiter parameter of preg_quote should be used to escape slashes.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork orejime-3562816

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

prudloff created an issue. See original summary.

prudloff’s picture

Status: Active » Needs review
fabsgugu’s picture

This is a bug that has been fixed in version 3.

I will look into fixing this bug in version 2 as well soon.

  • fabsgugu committed ca9a35a1 on 2.0.x
    feat: #3562816 preg_quote() should also escape delimiter
    
    By: prudloff...
fabsgugu’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.