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

ocMod regex operations are never trimmed #2925

Closed
ghost opened this issue Apr 16, 2015 · 2 comments
Closed

ocMod regex operations are never trimmed #2925

ghost opened this issue Apr 16, 2015 · 2 comments

Comments

@ghost
Copy link

ghost commented Apr 16, 2015

The trim attribute is ignored for regex search operations. Code similar to the regular search operation should be added for regex:

$trim = $operation->getElementsByTagName('search')->item(0)->getAttribute('trim');

if (!$trim || $trim == 'true') {
    $search = trim($search);
}

Otherwise a regex with whitespace is very likely to fail.

@danielkerr
Copy link
Member

so u add soem regex to account for white space

s+ i think

@ghost
Copy link
Author

ghost commented Apr 19, 2015

Not the code. The XML file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant