View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
16531 | Bug reports | Conditions | public | 2020-07-28 02:20 | 2020-08-12 10:10 |
Reporter | gabrieljenik | Assigned To | gabrieljenik | ||
Priority | none | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 4.3.6 | ||||
Summary | 16531: Validation regex including unicode characters fails | ||||
Description | This is a clone of 16273. I´m testing this simple regex to validate the content of an user response: /^[A-Z0-9\s]+$/ It matches capital letters, numbers and whitespaces. It seems to be correct and works fine. But assume I would like to include the unicode char "á". I've tested the following regexes with no results: /^[áA-Z0-9\s]+$/ /^[\x00E1A-Z0-9\s]+$/ /^[\x{00E1}A-Z0-9\s]+$/ /^[\u00E1A-Z0-9\s]+$/ 0x00E1 is the hex code value for "á" Tha validation test fails in all the cases above | ||||
Steps To Reproduce | Using a test survey, apply this validation regex to any response field and test... | ||||
Tags | No tags attached. | ||||
Bug heat | 6 | ||||
Complete LimeSurvey version number (& build) | 4.3.6 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | Mysql | ||||
Server OS (if known) | |||||
Webserver software & version (if known) | |||||
PHP Version | 7 | ||||
related to | 16273 | closed | gabrieljenik | Validation regex including unicode characters fails |
PR: https://github.com/LimeSurvey/LimeSurvey/pull/1521 Decoding html before running regex. This (a decode string) is similar to what the PHP side regex function gets. |
|
Tested the issue before pulling the PR, Issue exist. Tested the issue after pulling the PR, below are my findings: /^[\x{00E1}A-Z0-9\s]+$/ /^[\u00E1A-Z0-9\s]+$/ Please refer the attachment for more details |
|
Actually the codes mentioned above where wrong , I tried giving as below : ^[\xE1A-Z0-9\s]+$ Working as expected |
|
Please refer the attachment for more details |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=30367 |
|
Fixed in Release 4.3.10+200812 |
|
LimeSurvey: master b46da279 2020-08-10 17:44 Committer: GitHub Details Diff |
Fixed issue 16531: Validation regex including unicode characters fails (#1521) Decoding html before running regex. This (a decode string) is similar to what the PHP side regex function gets. |
Affected Issues 16531 |
|
mod - assets/packages/expressions/em_javascript.js | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-07-28 02:20 | gabrieljenik | New Issue | |
2020-07-28 02:20 | gabrieljenik | Issue generated from: 16273 | |
2020-07-28 02:20 | gabrieljenik | Relationship added | related to 16273 |
2020-07-29 14:40 | cdorin | Status | new => confirmed |
2020-07-29 19:58 | gabrieljenik | Note Added: 59160 | |
2020-08-06 15:11 |
|
Note Added: 59343 | |
2020-08-06 15:11 |
|
File Added: 16531_AfterPR_Unicode.png | |
2020-08-06 15:11 |
|
File Added: 16531_AfterPR_Hexcode.png | |
2020-08-06 15:11 |
|
File Added: 16531_BeforePR_Unicode.png | |
2020-08-07 16:47 |
|
Note Added: 59372 | |
2020-08-07 16:50 |
|
Note Added: 59373 | |
2020-08-07 16:50 |
|
File Added: HexaCode.png | |
2020-08-10 15:57 | gabrieljenik | Changeset attached | => LimeSurvey master b46da279 |
2020-08-10 15:57 | gabrieljenik | Note Added: 59392 | |
2020-08-10 15:57 | gabrieljenik | Assigned To | => gabrieljenik |
2020-08-10 15:57 | gabrieljenik | Resolution | open => fixed |
2020-08-12 10:10 | lime_release_bot | Note Added: 59425 | |
2020-08-12 10:10 | lime_release_bot | Status | confirmed => closed |