Skip to content

Commit

Permalink
Merge pull request #791 from PtrNrs/master
Browse files Browse the repository at this point in the history
iclean(): Bypass call to iconv() if necessary
  • Loading branch information
pollen8 committed Jul 10, 2013
2 parents 81a9f05 + 0431c50 commit bdb0329
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/com_fabrik/helpers/string.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,11 @@ public static function iclean($str, $fromEnc = "UTF-8", $toEnc = "ASCII//IGNORE/
*/

// Replace accented characters with ascii equivalent e.g. é => e
$str = (str_replace("'", '', @iconv($fromEnc, $toEnc, $str)));
$str1 = (@iconv($fromEnc, $toEnc, $str));
if($str1) {
$str = $str1;
}
$str = (str_replace("'", '', $str));
}
// Compress internal whitespace and replace with _
$str = preg_replace('/\s+/', '_', $str);
Expand Down

0 comments on commit bdb0329

Please sign in to comment.