Forbidden characters not getting replaced Forbidden characters not getting replaced
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Forbidden characters not getting replaced

Started by Abbas Ali, September 19, 2005, 10:36:29 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Abbas Ali

In the function replace_forbidden in functions.inc.php the code


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


gives a 2D array in $forbidden_chars and hence


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]
Chief Geek at Ranium Systems

Joachim Müller

haven't checked, but this sounds like very good work.

artistsinhawaii

Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

Joachim Müller

needs confirmation before being marked as fixed - Abbas requested a dev confirm his fix.

artistsinhawaii

Ah!  sorry,
I thought this was tied in to the other forbidden character issues that were just fixed.


Dennis
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

Abbas Ali

Yes this was partly tied to the Spaces in filenames issue issue which has been fixed now.

Marking this thread as fix.
Chief Geek at Ranium Systems