Advanced search  

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

Pages: [1]   Go Down

Author Topic: Forbidden characters not getting replaced  (Read 9601 times)

0 Members and 1 Guest are viewing this topic.

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Forbidden characters not getting replaced
« 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]
« Last Edit: September 26, 2005, 10:02:43 am by Abbas Ali »
Logged
Chief Geek at Ranium Systems

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Forbidden characters not getting replaced
« Reply #1 on: September 19, 2005, 10:14:02 pm »

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

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: Forbidden characters not getting replaced
« Reply #2 on: September 24, 2005, 09:53:56 pm »

Shouldn't this be marked "fixed" as well?
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Forbidden characters not getting replaced
« Reply #3 on: September 25, 2005, 08:34:24 am »

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

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: Forbidden characters not getting replaced
« Reply #4 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
Logged
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

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Forbidden characters not getting replaced
« Reply #5 on: September 26, 2005, 10:01:50 am »

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

Marking this thread as fix.
Logged
Chief Geek at Ranium Systems
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 18 queries.