symphonycms/symphonycms

Handle creation is broken in 2.7

michael-e opened this issue · 4 comments

Affected Symphony version(s) : 2.7.x
PHP version(s) : all

Handle creation in Symphony 2.7 is broken. +characters, for example, will be included in handles, but they should not be. You can even break datasource filtering (by handles) if you include +++ in a string.

#2887 escaped literal hyphens in character classes in order to prevent errors in PHP 7.3+. Unfortunatley, one of the fixes (in General::createHandle) was erroneous, because the hyphen in question was not meant to be a literal hyphen (but part of a character range instead).

I willl send a pull request.

See also #2907

@michael-e your PR sadly did not help with my particular problem of untransliterated |-characters in handles. Using the preg-expression from 3.0.0 seems to do the trick.* @nitriques would probably know if this has other side effects.

* in line 347 changing to preg_match_all('/[\p{L}\w:;.,+=~]+/u', $string, $matches); from 9c43772

your PR sadly did not help with my particular problem of untransliterated |-characters

Well, it was not intended to do so. In other words: This is a different issue.

your PR sadly did not help with my particular problem of untransliterated |-characters

Well, it was not intended to do so. In other words: This is a different issue.

OK, I see. I was hoping defining a transliterarion for | in the lang_german-extension would help, but it did not.