album with a return character in the album name will cause g2image to fail to load tree

alfal

Joined: 2002-10-21
Posts: 9
Posted: Thu, 2008-02-28 16:47

Hi All -

I just stumbled upon an issue with wpg2. If you have an album with a return character in the album name, the dtree javascript will be invalid and will not load for g2image. I did a quick fix for my needs, but wanted to share this information as it could be annoying to others.

My quick fix was simply:

in wp-content/plugins/wpg2/g2image/g2image.php
add on line 434
$album_title = preg_replace("/(\n|\r)/"," ",$album_title);

Version info:
Wordpress: 2.3.3
Gallery: 2.2.4
wpg2: 3.0.2

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Thu, 2008-02-28 21:45

Thanks for this, I have opened a bug ticket with your fix..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo