Allow digit characters in
t-prod opened this issue · 6 comments
t-prod commented
Hi,
I would like to name an attribute with digits like this : <AD1XCVD>
.
It does not work cause there is a preg_replace that prevents it , so I obtain this <ADXCVD>
vendor\aaronddm\xml-builder\lib\XMLElementData.php we have this line
$name = preg_replace('/([^a-zA-Z\-\_\:]+)/', '', $name);
How can I do to allow it please ?
t-prod commented
I think it could be nice to allow digits here and to change the preg_replace.
Could you do it ?
Thanks again
t-prod commented
We could do this :
$name = preg_replace('/([^a-zA-Z0-9\-\_\:]+)/', '', $name);
AaronDDM commented
Yeah, this needs improvement - i'll have a look.
t-prod commented
Hi AaronDDM,
Do you think you can add this to allow the missing characters we can have ?
Thanks
AaronDDM commented
Yep, will have an update this weekend!