forum.coppermine-gallery.net

Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: Abbas Ali on September 19, 2005, 10:36:29 am

Title: Forbidden characters not getting replaced
Post by: Abbas Ali on September 19, 2005, 10:36:29 am
In the function replace_forbidden in functions.inc.php the code

Code: [Select]
preg_match_all("#$mb_utf8_regex".'|[\x00-\x7F]#', $chars, $forbidden_chars);

gives a 2D array in $forbidden_chars and hence

Code: [Select]
str_replace($forbidden_chars, '_', $str);

was not working and forbidden chars were not being replaced with "_"

Modified the code accordingly and committed to devel version. Please confirm.

[Edit]
Added space and ampersand for forbiden_fname_char in insert query (basic.sql) and added an update query for the same in update.sql
[/Edit]
Title: Re: Forbidden characters not getting replaced
Post by: Joachim Müller on September 19, 2005, 10:14:02 pm
haven't checked, but this sounds like very good work.
Title: Re: Forbidden characters not getting replaced
Post by: artistsinhawaii on September 24, 2005, 09:53:56 pm
Shouldn't this be marked "fixed" as well?
Title: Re: Forbidden characters not getting replaced
Post by: Joachim Müller on September 25, 2005, 08:34:24 am
needs confirmation before being marked as fixed - Abbas requested a dev confirm his fix.
Title: Re: Forbidden characters not getting replaced
Post by: artistsinhawaii on September 25, 2005, 09:13:16 am
Ah!  sorry,
I thought this was tied in to the other forbidden character issues that were just fixed.


Dennis
Title: Re: Forbidden characters not getting replaced
Post by: Abbas Ali on September 26, 2005, 10:01:50 am
Yes this was partly tied to the Spaces in filenames issue (http://forum.coppermine-gallery.net/index.php?topic=21878.0) issue which has been fixed now.

Marking this thread as fix.