Summary:
Quotes are removed from string in smart_explode
Detailed Description:
Encountered this problem while trying to import properties containg html-links
in frontendusers. I had textareas with normal links (<a href="....">...</a>) and
found that the quotes around the urls where being dropped by the smart_explode
function.
I tried to fix this by adding
$col .= $str[$i];
to the case testing for $safe_char ( i.e. quotes).
This leads to double quote-marks when importing csv-files, as quotes need to be
preceded by a quote (""). This code seems to fix the problem:
case $safe_char:
if( $prev_char != '\\' )
{
$is_safe = !$is_safe;
}
if( $prev_char != '"' )
{
$col .= $str[$i];
}
break;
It works while importing csv-files in FEU and has not been tested elsewhere. I
am worried about how it works with strings where quotes are escaped with
backslash, instead of another quote.
Please do not use this fix in a production-environment. It is untested and can
probably result in unpredicted problems.