URL sanatize with "-" instead of "_"
Posted: 23 Aug 2016, 16:59
Hi,
I just want to know if there is a simple way to have the product names etc. sanitized with "-" instead of "_"
If I am correct what will work is to set:
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_url']
Copy the Method:
\Aimeos\Aimeos\Base\View::addUrl
without the callable check and replace \Aimeos\MW\View\Helper\Url\T3Cli
and \Aimeos\MW\View\Helper\Url\Typo3
with my own classes that extend the original and add a own sanatize method that
is a copy of the method from \Aimeos\MW\View\Helper\Url\Base
but in preg_replace it replaces the "_" instead with "-".
i am asking because:
1.) I think it looks better
2.) realurl is by default using "-" and with 2.0.x the parameter to modify it has become deprecated, so it would be better to use the same sanatize parameter as realurl does.
Is there a simpler solution?
If not, is there a possibility that I might run intro troubles when using "-" instead of "_"?
I guess it would always work correctly for "d_name" and "f_name" as those are optional parameters but what about those that set the $all parameter?
In that regard: I noticed an issue with the realurl autoconfiguration:
The parameter ai[c_step] is not set always, e.g. on the payment success url which results in "..//.." being used, however that might not be transferred correctly by the payment provider etc. so I think this parameter should be split instead.
I just want to know if there is a simple way to have the product names etc. sanitized with "-" instead of "_"
If I am correct what will work is to set:
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_url']
Copy the Method:
\Aimeos\Aimeos\Base\View::addUrl
without the callable check and replace \Aimeos\MW\View\Helper\Url\T3Cli
and \Aimeos\MW\View\Helper\Url\Typo3
with my own classes that extend the original and add a own sanatize method that
is a copy of the method from \Aimeos\MW\View\Helper\Url\Base
but in preg_replace it replaces the "_" instead with "-".
i am asking because:
1.) I think it looks better
2.) realurl is by default using "-" and with 2.0.x the parameter to modify it has become deprecated, so it would be better to use the same sanatize parameter as realurl does.
Is there a simpler solution?
If not, is there a possibility that I might run intro troubles when using "-" instead of "_"?
I guess it would always work correctly for "d_name" and "f_name" as those are optional parameters but what about those that set the $all parameter?
In that regard: I noticed an issue with the realurl autoconfiguration:
Code: Select all
'co' => array(
array( 'GETvar' => 'ai[c_step]' ),
array( 'GETvar' => 'code' ),
array( 'GETvar' => 'orderid' ),
),