AaronDDM/XMLBuilder

Allow digit characters in

t-prod opened this issue · 6 comments

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 ?

I think it could be nice to allow digits here and to change the preg_replace.
Could you do it ?

Thanks again

We could do this :

$name = preg_replace('/([^a-zA-Z0-9\-\_\:]+)/', '', $name);

Yeah, this needs improvement - i'll have a look.

Hi AaronDDM,

Do you think you can add this to allow the missing characters we can have ?
Thanks

Yep, will have an update this weekend!

Hey @t-prod check out v2.0.2 and let me know if that works!

Thanks